<!DOCTYPE html>












  


<html class="theme-next mist use-motion" lang="zh-CN">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">



  
  
  <link rel="stylesheet" href="/lib/needsharebutton/needsharebutton.css">










<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=6.6.0" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png?v=6.6.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png?v=6.6.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png?v=6.6.0">


  <link rel="mask-icon" href="/images/safari-logo.svg?v=6.6.0" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '6.6.0',
    sidebar: {"position":"left","width":300,"display":"post","offset":12,"b2t":false,"scrollpercent":true,"onmobile":true},
    fancybox: true,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="简介Manjaro LinuxManjaro Linux是一个基于Arch Linux的发行版，继承了后者轻快、滚动式更新、AUR软件多的==优点==，同时又改善了后者对新手不友好、软件包过于激进、不够稳定的==缺点==，是最能拿来用、最好用的Linux发行版。 它不仅开箱即用，界面人性化，轻快不卡慢，稳定无崩溃，安静无弹窗，最最可喜的是软件超多！相信你用了Manjaro之后，再不会折腾、也不会再">
<meta name="keywords" content="manjaro,Linux,xfce,踩坑记录">
<meta property="og:type" content="article">
<meta property="og:title" content="manjaro-xfce-18-踩坑记录">
<meta property="og:url" content="https://elinuxboy.github.io/Linux/manjaro-xfce-18-踩坑记录.html">
<meta property="og:site_name" content="elinuxboy 的个人博客">
<meta property="og:description" content="简介Manjaro LinuxManjaro Linux是一个基于Arch Linux的发行版，继承了后者轻快、滚动式更新、AUR软件多的==优点==，同时又改善了后者对新手不友好、软件包过于激进、不够稳定的==缺点==，是最能拿来用、最好用的Linux发行版。 它不仅开箱即用，界面人性化，轻快不卡慢，稳定无崩溃，安静无弹窗，最最可喜的是软件超多！相信你用了Manjaro之后，再不会折腾、也不会再">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="https://img2018.cnblogs.com/blog/1548353/201812/1548353-20181215111028661-336226830.png">
<meta property="og:image" content="https://img2018.cnblogs.com/blog/1548353/201812/1548353-20181215111114015-343509629.png">
<meta property="og:image" content="https://img2018.cnblogs.com/blog/1548353/201812/1548353-20181215111509383-263018155.png">
<meta property="og:image" content="https://img2018.cnblogs.com/blog/1548353/201812/1548353-20181215111451681-1556416322.png">
<meta property="og:image" content="https://img2018.cnblogs.com/blog/1548353/201812/1548353-20181215111158407-1723419260.png">
<meta property="og:image" content="https://img2018.cnblogs.com/blog/1548353/201812/1548353-20181215111136319-520114191.png">
<meta property="og:updated_time" content="2019-01-05T00:04:31.836Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="manjaro-xfce-18-踩坑记录">
<meta name="twitter:description" content="简介Manjaro LinuxManjaro Linux是一个基于Arch Linux的发行版，继承了后者轻快、滚动式更新、AUR软件多的==优点==，同时又改善了后者对新手不友好、软件包过于激进、不够稳定的==缺点==，是最能拿来用、最好用的Linux发行版。 它不仅开箱即用，界面人性化，轻快不卡慢，稳定无崩溃，安静无弹窗，最最可喜的是软件超多！相信你用了Manjaro之后，再不会折腾、也不会再">
<meta name="twitter:image" content="https://img2018.cnblogs.com/blog/1548353/201812/1548353-20181215111028661-336226830.png">






  <link rel="canonical" href="https://elinuxboy.github.io/Linux/manjaro-xfce-18-踩坑记录.html">



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>manjaro-xfce-18-踩坑记录 | elinuxboy 的个人博客</title>
  











  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope="" itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope="" itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">elinuxboy 的个人博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
      
        <h1 class="site-subtitle" itemprop="description">为者常成，行者常至!<br> Just Do It！</h1>
      
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">

    
    
    
      
    

    
      
    

    <a href="/" rel="section"><i class="menu-item-icon fa fa-fw fa-home"></i> <br>首页</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-about">

    
    
    
      
    

    
      
    

    <a href="/about/" rel="section"><i class="menu-item-icon fa fa-fw fa-user"></i> <br>关于</a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">

    
    
    
      
    

    
      
    

    <a href="/tags/" rel="section"><i class="menu-item-icon fa fa-fw fa-tags"></i> <br>标签<span class="badge">17</span></a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">

    
    
    
      
    

    
      
    

    <a href="/categories/" rel="section"><i class="menu-item-icon fa fa-fw fa-th"></i> <br>分类<span class="badge">7</span></a>

  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">

    
    
    
      
    

    
      
    

    <a href="/archives/" rel="section"><i class="menu-item-icon fa fa-fw fa-archive"></i> <br>归档<span class="badge">7</span></a>

  </li>

      
      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br>搜索</a>
        </li>
      
    </ul>
  

  
    

  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off" placeholder="搜索..." spellcheck="false" type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>



  



</div>
    </header>

    
  
  
  
  

  

    <a href="https://github.com/elinuxboy" class="github-corner" title="Follow me on GitHub" aria-label="Follow me on GitHub" rel="noopener" target="_blank"><svg width="80" height="80" viewbox="0 0 250 250" style="fill: #222; color: #fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"/><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"/></svg></a>



    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://elinuxboy.github.io/Linux/manjaro-xfce-18-踩坑记录.html">

    <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person">
      <meta itemprop="name" content="elinuxoby">
      <meta itemprop="description" content="elinuxboy 的个人博客">
      <meta itemprop="image" content="/images/head.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="elinuxboy 的个人博客">
    </span>

    
      <header class="post-header">

        
        
          <h2 class="post-title" itemprop="name headline">manjaro-xfce-18-踩坑记录
              
            
          </h2>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2018-12-24 10:39:08" itemprop="dateCreated datePublished" datetime="2018-12-24T10:39:08+08:00">2018-12-24</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2019-01-05 08:04:31" itemprop="dateModified" datetime="2019-01-05T08:04:31+08:00">2019-01-05</time>
              
            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing"><a href="/categories/Linux/" itemprop="url" rel="index"><span itemprop="name">Linux</span></a></span>

                
                
                  ，
                
              
                <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing"><a href="/categories/Linux/xfce/" itemprop="url" rel="index"><span itemprop="name">xfce</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="post-meta-item-icon">
            <i class="fa fa-eye"></i>
             阅读次数： 
            <span class="busuanzi-value" id="busuanzi_value_page_pv"></span>
            </span>
          

          
            <div class="post-symbolscount">
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">本文字数：</span>
                
                <span title="本文字数">37k</span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">33 分钟</span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="简介"><a href="#简介" class="headerlink" title="简介"></a>简介</h2><h3 id="Manjaro-Linux"><a href="#Manjaro-Linux" class="headerlink" title="Manjaro Linux"></a>Manjaro Linux</h3><p>Manjaro Linux是一个基于Arch Linux的发行版，继承了后者<strong>轻快</strong>、<strong>滚动式更新</strong>、<strong>AUR软件多</strong>的==优点==，同时又<strong>改善了</strong>后者对新手不友好、软件包过于激进、不够稳定的==缺点==，是最能拿来用、最好用的Linux发行版。</p>
<p>它不仅<strong>开箱即用</strong>，<strong>界面人性化</strong>，<strong>轻快不卡慢</strong>，稳定无崩溃，<strong>安静无弹窗</strong>，最最可喜的是<strong>软件超多</strong>！相信你用了Manjaro之后，再不会折腾、也不会再抛弃这个发行版了。</p>
<h3 id="开发桌面环境"><a href="#开发桌面环境" class="headerlink" title="开发桌面环境"></a>开发桌面环境</h3><p>这是我的 manjaro xfce 18 安装好以后的桌面使用情况：</p>
<div><div class="fold_hider"><div class="close hider_title">点击显示/隐藏内容</div></div><div class="fold">
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> elinuxboy @ mjro18xfce <span class="keyword">in</span> ~ [9:57:35] </span></span><br><span class="line"><span class="meta">$</span><span class="bash"> screenfetch</span></span><br><span class="line"></span><br><span class="line"> ██████████████████  ████████     elinuxboy@mjro18xfce</span><br><span class="line"> ██████████████████  ████████     OS: Manjaro 18.0 Illyria</span><br><span class="line"> ██████████████████  ████████     Kernel: x86_64 Linux 4.19.8-2-MANJARO</span><br><span class="line"> ██████████████████  ████████     Uptime: 1m</span><br><span class="line"> ████████            ████████     Packages: 1301</span><br><span class="line"> ████████  ████████  ████████     Shell: zsh 5.6.2</span><br><span class="line"> ████████  ████████  ████████     Resolution: 1366x768</span><br><span class="line"> ████████  ████████  ████████     DE: Xfce4</span><br><span class="line"> ████████  ████████  ████████     WM: Xfwm4</span><br><span class="line"> ████████  ████████  ████████     WM Theme: Arc-Dark</span><br><span class="line"> ████████  ████████  ████████     GTK Theme: Arc-Dark [GTK2]</span><br><span class="line"> ████████  ████████  ████████     Icon Theme: Numix-Circle</span><br><span class="line"> ████████  ████████  ████████     Font: 文泉驿微米黑 12</span><br><span class="line"> ████████  ████████  ████████     CPU: Intel Core i5-5200U @ 4x 2.7GHz [46.0°C]</span><br><span class="line">                                  GPU: Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2) </span><br><span class="line">                                  RAM: 602MiB / 7892MiB</span><br></pre></td></tr></table></figure>

</div></div>
<p>我对桌面环境的需求次序（优先级由高到低）：</p>
<blockquote>
<p>  系统性能好，占用资源少——》软件数量多——》对用户友好，易安装，易使用——》界面美观</p>
</blockquote>
<ul>
<li><p>性能</p>
<p>对<strong>系统性能</strong>的要求，必须要足够好，占用资源少，给开发留下的资源越多越好。</p>
<p>作为一个开发者（程序员），想要提工作高效率，对系统性能的要求几乎达到苛刻的地步。</p>
<p>因为开发者在处理一个问题时，动则要调用大量工具，或者同时打开十几、几十、上百个网页来搜索网上的解决方案，而firefox或chrome等上网工具都是吃内存大户（牺牲空间复杂度换来快速的时间复杂度），有时候必须牺牲一些后台程序以加快系统速度适应开发者的需要。</p>
<p>而Manjaro Linux发行版和Xfce桌面都具有快速、轻量、加载程序快速、占用的系统资源少的优点。</p>
</li>
<li><p>软件</p>
<p>为了节省不必要的折腾时间，开发者手头上的工具是越多越好、越容易获取越好。</p>
<p>centos、slackware这些软件奇缺或者需要非常复杂的途径才能找到安装源的系统就没必要尝试了。</p>
<p>ubuntu系软件比较丰富，但QQ/TIM这样的基本软件还需要折腾一番，还未必能稳定使用。</p>
<p><a href="https://www.lulinux.com/archives/2787" target="_blank" rel="noopener">arch linux系软件包异常丰富</a>，无情碾压deb和rpm系诸多发行版，例如manjaro下可以一条命令安装好无比稳定、功能全面的deepinwine-tim或deepinwine-qq。</p>
</li>
<li><p>对用户友好</p>
<p>对任何一个工作者来说，时间就是衡量一切价值的标准，节省时间就是延长生命尺度。拿archlinux为反面典型，虽然其性能高可以节省工作时间，但是如果安装它都要从头开始学习ABC，那价值就大打折扣。就安装系统的便捷性来说，archlinux、gentoo、lfs这样的系统真没必要尝试。</p>
</li>
<li><p>界面外观</p>
<p>为了性能，必须牺牲酷炫的外观，过炫的桌面影响桌面性能；但是过于简单的桌面需要花时间配置还不一定能完全配置好，也是影响工作效率。所以，外观普通即可，默认桌面选择xfce4、lxde、mate甚至仿制windows界面都是不错的。</p>
</li>
</ul>
<p>综合考虑下，以下是我对一些发行版及桌面的排序（仅代表个人观点）：</p>
<ul>
<li>发行版：</li>
</ul>
<blockquote>
<p>  manjaro——》mint——》ubuntu——》debian——》其他</p>
</blockquote>
<ul>
<li>桌面环境</li>
</ul>
<blockquote>
<p>  xfce 4——》mate/gnome-classic——》cinnamon——》lxde——》其他</p>
</blockquote>
<p>我选择的开发桌面环境：</p>
<ul>
<li>manjaro-xfce-18.0-stable（第一选择）</li>
<li>linuxmint-19-xfce</li>
<li>ubuntu-16.04.5-desktop</li>
</ul>
<h2 id="自动打开-NumLock"><a href="#自动打开-NumLock" class="headerlink" title="自动打开 NumLock"></a>自动打开 NumLock</h2><p>确保已经安装 numlockx, 然后编辑 /etc/lightdm/lightdm.conf文件，在末尾添加以下几行:</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">[Seat:*]</span><br><span class="line">greeter-setup-script=/usr/bin/numlockx on</span><br></pre></td></tr></table></figure>
<h2 id="系统快照"><a href="#系统快照" class="headerlink" title="系统快照"></a>系统快照</h2><h3 id="安装timeshift"><a href="#安装timeshift" class="headerlink" title="安装timeshift"></a>安装timeshift</h3><p><code>sudo pacman -S timeshift</code></p>
<h3 id="使用timeshift创建系统快照"><a href="#使用timeshift创建系统快照" class="headerlink" title="使用timeshift创建系统快照"></a>使用timeshift创建系统快照</h3><p><img src="https://img2018.cnblogs.com/blog/1548353/201812/1548353-20181215111028661-336226830.png" alt=""></p>
<h2 id="国内源设置"><a href="#国内源设置" class="headerlink" title="国内源设置"></a>国内源设置</h2><h3 id="manjaro官方软件仓库"><a href="#manjaro官方软件仓库" class="headerlink" title="manjaro官方软件仓库"></a>manjaro官方软件仓库</h3><h4 id="自动寻找最快的源"><a href="#自动寻找最快的源" class="headerlink" title="自动寻找最快的源"></a>自动寻找最快的源</h4><p><code>sudo pacman-mirrors -i -c China -m rank</code></p>
<div><div class="fold_hider"><div class="close hider_title">点击显示/隐藏内容</div></div><div class="fold">
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">[elinuxboy@mjro18xfce ~]$ sudo pacman-mirrors -i -c China -m rank</span><br><span class="line">.: INFO Downloading mirrors from repo.manjaro.org</span><br><span class="line">.: INFO Using default mirror file</span><br><span class="line">.: INFO Querying mirrors - This may take some time</span><br><span class="line">   0.867 China          : https://mirrors.ustc.edu.cn/manjaro/</span><br><span class="line">   0.557 China          : http://mirrors.tuna.tsinghua.edu.cn/manjaro/</span><br><span class="line">   0.861 China          : https://mirrors.zju.edu.cn/manjaro/</span><br><span class="line">   0.727 China          : https://mirrors.sjtug.sjtu.edu.cn/manjaro/</span><br><span class="line"></span><br><span class="line">.: INFO User generated mirror list</span><br><span class="line">--</span><br><span class="line">.: INFO Custom mirror file saved: /var/lib/pacman-mirrors/custom-mirrors.json</span><br><span class="line">.: INFO Writing mirror list</span><br><span class="line">   China           : http://mirrors.tuna.tsinghua.edu.cn/manjaro/stable/$repo/$a</span><br><span class="line">.: INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist</span><br><span class="line">[elinuxboy@mjro18xfce ~]$</span><br></pre></td></tr></table></figure>

</div></div>
<h4 id="选择源"><a href="#选择源" class="headerlink" title="选择源"></a>选择源</h4><p>在弹出窗口中选择排第一位的源（这里选择清华大学tsinghua的源）然后点击“OK”，再次单击“确定”即可选择好最快的源。</p>
<p><img src="https://img2018.cnblogs.com/blog/1548353/201812/1548353-20181215111114015-343509629.png" alt=""></p>
<h4 id="更新源"><a href="#更新源" class="headerlink" title="更新源"></a>更新源</h4><p><code>sudo pacman -Sy</code></p>
<h3 id="非官方仓库（Arch-Linux-中文社区仓库）"><a href="#非官方仓库（Arch-Linux-中文社区仓库）" class="headerlink" title="非官方仓库（Arch Linux 中文社区仓库）"></a>非官方仓库（Arch Linux 中文社区仓库）</h3><p>Arch Linux 中文社区仓库 是由 Arch Linux 中文社区驱动的非官方用户仓库。包含中文用户常用软件、工具、字体/美化包等。</p>
<p>完整的包信息列表（包名称/架构/维护者/状态）请 <a href="https://github.com/archlinuxcn/repo" target="_blank" rel="noopener">点击这里</a> 查看。</p>
<ul>
<li>官方仓库地址：<a href="http://repo.archlinuxcn.org/" target="_blank" rel="noopener">http://repo.archlinuxcn.org</a></li>
<li>镜像地址: <a href="https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/" target="_blank" rel="noopener">https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/</a></li>
</ul>
<h4 id="手动添加archlinuxcn清华源"><a href="#手动添加archlinuxcn清华源" class="headerlink" title="手动添加archlinuxcn清华源"></a>手动添加archlinuxcn清华源</h4><p><code>sudo vim /etc/pacman.conf</code></p>
<p>用上面的命令编辑/etc/pacman.conf，在最下方添加（这里使用清华大学的源）：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">[archlinuxcn]</span><br><span class="line">Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch</span><br></pre></td></tr></table></figure>
<p>详情参见附录I。</p>
<p><img src="https://img2018.cnblogs.com/blog/1548353/201812/1548353-20181215111509383-263018155.png" alt=""></p>
<h4 id="更新源-1"><a href="#更新源-1" class="headerlink" title="更新源"></a>更新源</h4><p><code>sudo pacman -Sy</code></p>
<h4 id="安装archlinuxcn-keyring包导入GPG-key："><a href="#安装archlinuxcn-keyring包导入GPG-key：" class="headerlink" title="安装archlinuxcn-keyring包导入GPG key："></a>安装archlinuxcn-keyring包导入GPG key：</h4><p><code>sudo pacman -S archlinuxcn-keyring</code></p>
<h4 id="再次更新源"><a href="#再次更新源" class="headerlink" title="再次更新源"></a>再次更新源</h4><p><code>sudo pacman -Sy</code></p>
<h2 id="安装yaourt以及pacaur"><a href="#安装yaourt以及pacaur" class="headerlink" title="安装yaourt以及pacaur"></a>安装yaourt以及pacaur</h2><p>为了安装使用AUR方便，也可以额外安装yaourt以及pacaur</p>
<p><code>sudo pacman -S yaourt pacaur</code></p>
<p><strong>注意：</strong>使用使用yaourt安装软件时：</p>
<blockquote>
<p>  a.不需要使用sudo否则报root错误；</p>
<p>  b.在提示调用vim时 输入vim然后回车；</p>
<p>  c.如果不想输入vim: 修改~/.zshrc 文件文件最后加入export VISUAL=“vim” 即可。</p>
</blockquote>
<h2 id="软件安装时下载加速"><a href="#软件安装时下载加速" class="headerlink" title="软件安装时下载加速"></a>软件安装时下载加速</h2><p>设置替换wget或者curl下载命令。以下在配置时，aria2c和axel使用其中一种即可（这里使用aria2c）。</p>
<h3 id="使用aria2c多线程多链接加速"><a href="#使用aria2c多线程多链接加速" class="headerlink" title="使用aria2c多线程多链接加速"></a>使用aria2c多线程多链接加速</h3><p>aria2c 是一个自由、开源、轻量级多协议和多源的命令行下载工具。</p>
<p>aria2c 支持 HTTP/HTTPS、FTP、SFTP、 BitTorrent 和 Metalink 协议。</p>
<p>aria2c 可以通过内建的 JSON-RPC 和 XML-RPC 接口来操纵。</p>
<p>aria2c 下载文件的时候，自动验证数据块。它可以通过多个来源或者多个协议下载一个文件，并且会尝试利用你的最大下载带宽。</p>
<p>aria2c 支持多线程，可以使用多个源或协议下载文件，确实可以加速并尽可能多的完成下载。</p>
<h4 id="安装aria2c"><a href="#安装aria2c" class="headerlink" title="安装aria2c"></a>安装aria2c</h4><p><code>sudo pacman -Sy aria2c</code></p>
<h4 id="配置pacman多线程多链接加速"><a href="#配置pacman多线程多链接加速" class="headerlink" title="配置pacman多线程多链接加速"></a>配置pacman多线程多链接加速</h4><p>编辑pacman配置文件/etc/pacman.conf，找到Xfercommand修改成如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">......</span><br><span class="line"><span class="meta">#</span><span class="bash"> aria2c 多线程多链接</span></span><br><span class="line">XferCommand = /usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 -d $(dirname %o) -o $(basename %o) %u</span><br><span class="line">......</span><br></pre></td></tr></table></figure>
<h4 id="配置yaourt多线程多链接加速"><a href="#配置yaourt多线程多链接加速" class="headerlink" title="配置yaourt多线程多链接加速"></a>配置yaourt多线程多链接加速</h4><p>编辑makepkg配置文件/etc/makepkg.conf，找到DLAGENTS修改成如下</p>
<div><div class="fold_hider"><div class="close hider_title">点击显示/隐藏内容</div></div><div class="fold">
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">...</span><br><span class="line"><span class="meta">#</span><span class="bash">DLAGENTS=(<span class="string">'file::/usr/bin/curl -gqC - -o %o %u'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'rsync::/usr/bin/rsync --no-motd -z %u %o'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'scp::/usr/bin/scp -C %u %o'</span>)</span></span><br><span class="line"><span class="meta">#</span><span class="bash">aria2c 多线程多链接</span></span><br><span class="line">DLAGENTS=('file::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'</span><br><span class="line">        'ftp::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'</span><br><span class="line">        'http::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'</span><br><span class="line">        'https::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'</span><br><span class="line">        'rsync::/usr/bin/rsync --no-motd -z %u %o'</span><br><span class="line">        'scp::/usr/bin/scp -C %u %o')</span><br><span class="line">...</span><br></pre></td></tr></table></figure>

</div></div>
<p>详情请参见附录II。</p>
<h3 id="使用Axel单线程多链接加速"><a href="#使用Axel单线程多链接加速" class="headerlink" title="使用Axel单线程多链接加速"></a>使用Axel单线程多链接加速</h3><p>Axel 是一个轻量级下载程序，它和其他加速器一样，对同一个文件建立多个连接，每个连接下载单独的文件片段以更快地完成下载。</p>
<p>Axel 支持 HTTP、HTTPS、FTP 和 FTPS 协议。它也可以使用多个镜像站点下载单个文件，所以，Axel 可以加速下载高达 40％（大约，我个人认为）。它非常轻量级，因为它没有依赖并且使用非常少的 CPU 和内存。</p>
<p>Axel 一步到位地将所有数据直接下载到目标文件（LCTT 译注：而不是像其它的下载软件那样下载成多个文件块，然后拼接）。</p>
<p>注意：不支持在单条命令中下载两个文件。</p>
<h4 id="安装axel"><a href="#安装axel" class="headerlink" title="安装axel"></a>安装axel</h4><p><del><code>sudo pacman -S axel</code></del></p>
<h4 id="配置pacman单线程多链接加速"><a href="#配置pacman单线程多链接加速" class="headerlink" title="配置pacman单线程多链接加速"></a>配置pacman单线程多链接加速</h4><p>编辑pacman配置文件/etc/pacman.conf，找到Xfercommand修改成如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">......</span><br><span class="line"><span class="meta">#</span><span class="bash"> axel 单线程多链接</span></span><br><span class="line">XferCommand = /usr/bin/axel -a -n 16 %u -o %o</span><br><span class="line">......</span><br></pre></td></tr></table></figure>
<h4 id="配置yaourt单线程多链接加速"><a href="#配置yaourt单线程多链接加速" class="headerlink" title="配置yaourt单线程多链接加速"></a>配置yaourt单线程多链接加速</h4><p>编辑makepkg配置文件/etc/makepkg.conf，找到DLAGENTS修改成如下</p>
<div><div class="fold_hider"><div class="close hider_title">点击显示/隐藏内容</div></div><div class="fold">
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">......</span><br><span class="line"><span class="meta">#</span><span class="bash">DLAGENTS=(<span class="string">'file::/usr/bin/curl -gqC - -o %o %u'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'rsync::/usr/bin/rsync --no-motd -z %u %o'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'scp::/usr/bin/scp -C %u %o'</span>)</span></span><br><span class="line"><span class="meta">#</span><span class="bash">axel 单线程多链接</span></span><br><span class="line">DLAGENTS=('file::/usr/bin/axel -a -n 16 %u -o %o'</span><br><span class="line">        'ftp::/usr/bin/axel -a -n 16 %u -o %o'</span><br><span class="line">        'http::/usr/bin/axel -a -n 16 %u -o %o'</span><br><span class="line">        'https::/usr/bin/axel -a -n 16 %u -o %o'</span><br><span class="line">        'rsync::/usr/bin/rsync --no-motd -z %u %o'</span><br><span class="line">        'scp::/usr/bin/scp -C %u %o')</span><br><span class="line">......</span><br></pre></td></tr></table></figure>

</div></div>
<h4 id="然后更新数据源"><a href="#然后更新数据源" class="headerlink" title="然后更新数据源"></a>然后更新数据源</h4><p><code>sudo pacman -Syy</code></p>
<h2 id="安装被锁定的问题"><a href="#安装被锁定的问题" class="headerlink" title="安装被锁定的问题"></a>安装被锁定的问题</h2><p><strong>注意：</strong>出现无法锁定database的错误时，在<strong>确认没有安装任务时</strong>运行以下命令删除锁定：</p>
<p><code>sudo rm /var/lib/pacman/db.lck</code></p>
<h2 id="升级系统"><a href="#升级系统" class="headerlink" title="升级系统"></a>升级系统</h2><p><code>sudo pacman -Syu</code></p>
<p>或者</p>
<p><code>yaourt -Syu</code></p>
<h2 id="常见的软件安装"><a href="#常见的软件安装" class="headerlink" title="常见的软件安装"></a>常见的软件安装</h2><h3 id="pacman-基本用法"><a href="#pacman-基本用法" class="headerlink" title="pacman 基本用法"></a>pacman 基本用法</h3><h4 id="安装软件"><a href="#安装软件" class="headerlink" title="安装软件"></a>安装软件</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 安装或者升级单个软件包，或者一列软件包（包含依赖包），使用如下命令：</span></span><br><span class="line">sudo pacman -S pkg_name1 pkg_name2 ...</span><br><span class="line"></span><br><span class="line"><span class="comment"># 安装一个本地包(不从源里下载）：</span></span><br><span class="line">sudo pacman -U /path/to/package/package_name-version.pkg.tar.xz</span><br><span class="line"></span><br><span class="line"><span class="comment"># 安装一个远程包（不在 pacman 配置的源里面）：</span></span><br><span class="line">sudo pacman -U http://www.example.com/repo/example.pkg.tar.xz</span><br><span class="line"></span><br><span class="line"><span class="comment"># 下载包而不安装它：</span></span><br><span class="line">sudo pacman -Sw pkg_name</span><br></pre></td></tr></table></figure>
<h4 id="删除软件"><a href="#删除软件" class="headerlink" title="删除软件"></a>删除软件</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 删除指定安装包，但是保留其全部已安装的依赖关系</span></span><br><span class="line">sudo pacman -R pkg_name </span><br><span class="line"></span><br><span class="line"><span class="comment"># 删除指定软件包，以及没有被其他已安装软件包使用的依赖关系。 </span></span><br><span class="line">sudo pacman -Rs pkg_name </span><br><span class="line"></span><br><span class="line"><span class="comment"># 删除软件包和所有依赖这个软件包的程序:</span></span><br><span class="line"><span class="comment"># 警告: 此操作是递归的，请小心检查，可能会一次删除大量的软件包。</span></span><br><span class="line">sudo pacman -Rsc pkg_name</span><br><span class="line"></span><br><span class="line"><span class="comment"># 删除软件包，但是不删除依赖这个软件包的其他程序：</span></span><br><span class="line">sudo pacman -Rdd pkg_name</span><br></pre></td></tr></table></figure>
<h4 id="清空缓存"><a href="#清空缓存" class="headerlink" title="清空缓存"></a>清空缓存</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 清除未安装软件包的缓存 </span></span><br><span class="line">sudo pacman -Sc</span><br></pre></td></tr></table></figure>
<h4 id="查询"><a href="#查询" class="headerlink" title="查询"></a>查询</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 在包数据库中查询软件包，查询位置包含了软件包的名字和描述(不指定string，则列出所有已安装的包)：</span></span><br><span class="line">pacman -Ss string1 string2 ...</span><br><span class="line"></span><br><span class="line"><span class="comment"># 查询包含某个文件的包名 	</span></span><br><span class="line">pacman -Fs pkg_name</span><br><span class="line"></span><br><span class="line"><span class="comment"># 查询远程库中软件包包含的文件：</span></span><br><span class="line">pacman -Fl pkg_name</span><br><span class="line"></span><br><span class="line"><span class="comment"># 获取已安装软件包所包含文件的列表：</span></span><br><span class="line">pacman -Ql pkg_name</span><br><span class="line"></span><br><span class="line"><span class="comment"># 查询已安装的软件包(不指定string，则列出所有已安装的包)：</span></span><br><span class="line">pacman -Qs string1 string2 ...</span><br><span class="line"></span><br><span class="line"><span class="comment"># 显示软件包的详尽的信息：</span></span><br><span class="line">sudo pacman -Si pkg_name</span><br><span class="line"></span><br><span class="line"><span class="comment"># 查询本地安装包的详细信息：</span></span><br><span class="line">sudo pacman -Qi pkg_name</span><br></pre></td></tr></table></figure>
<h4 id="同步文件数据库"><a href="#同步文件数据库" class="headerlink" title="同步文件数据库"></a>同步文件数据库</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 同步文件数据库:</span></span><br><span class="line">sudo pacman -Fy</span><br></pre></td></tr></table></figure>
<h4 id="升级系统-1"><a href="#升级系统-1" class="headerlink" title="升级系统"></a>升级系统</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 升级整个系统,这个命令会同步非本地(local)软件仓库并升级系统的软件包：</span></span><br><span class="line">sudo pacman -Syu</span><br><span class="line"></span><br><span class="line"><span class="comment"># 升级系统时安装其他软件包：</span></span><br><span class="line">sudo pacman -Syu pkg_name1 pkg_name2 ...</span><br><span class="line"></span><br><span class="line"><span class="comment"># 强制 pacman 刷新软件包列表，每次修改镜像之后都应该使用</span></span><br><span class="line">sudo pacman -Syyu</span><br></pre></td></tr></table></figure>
<h3 id="安装中文输入法"><a href="#安装中文输入法" class="headerlink" title="安装中文输入法"></a>安装中文输入法</h3><ul>
<li>安装小企鹅fcitx：</li>
</ul>
<p><em>fcitx安装后会默认安装了拼音和五笔输入法。</em></p>
<p><code>sudo pacman -S fcitx fcitx-im fcitx-configtool</code></p>
<p>需要修改配置文件 ~/.xprofile，添加如下语句：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash">fcitx</span></span><br><span class="line">export GTK_IM_MODULE=fcitx	</span><br><span class="line">export QT_IM_MODULE=fcitx	</span><br><span class="line">export XMODIFIERS="@im=fcitx"</span><br></pre></td></tr></table></figure>
<ul>
<li><p>安装其他中文输入法</p>
<p>搜狗拼音输入法</p>
<p><code>sudo pacman -S fcitx-sogoupinyin</code></p>
</li>
</ul>
<p>启动fcitx并设置输入法之后就可以使用中文输入法啦，如果异常请重新登录或者重启！！</p>
<h3 id="安装字体"><a href="#安装字体" class="headerlink" title="安装字体"></a>安装字体</h3><p><code>sudo pacman -S ttf-dejavu wqy-zenhei wqy-microhei  ttf-monaco</code></p>
<p>要使用新安装的字体，需要再设置里自行选择。</p>
<ul>
<li>设置——》外观——》字体——》选择默认字体和默认等宽字体</li>
</ul>
<h3 id="安装vim"><a href="#安装vim" class="headerlink" title="安装vim"></a>安装vim</h3><p><code>sudo pacman -S vim</code></p>
<h4 id="超强vim配置"><a href="#超强vim配置" class="headerlink" title="超强vim配置"></a>超强vim配置</h4><p>项目地址：<a href="https://github.com/elinuxboy/vim-deprecated" target="_blank" rel="noopener">https://github.com/elinuxboy/vim-deprecated</a></p>
<p>使用下面的命令自动安装配置：</p>
<p><code>wget -qO- https://raw.githubusercontent.com/elinuxboy/vim-deprecated/master/setup.sh | sh -x</code></p>
<p>或者用另一种方式自动安装：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">wget https://raw.githubusercontent.com/elinuxboy/vim-deprecated/master/setup.sh</span><br><span class="line">chmod +x setup.sh</span><br><span class="line">./setup.sh</span><br></pre></td></tr></table></figure>
<h3 id="安装markdown编辑器"><a href="#安装markdown编辑器" class="headerlink" title="安装markdown编辑器"></a>安装markdown编辑器</h3><p>以下只需要使用其中一种或几种。</p>
<p><code>yaourt -S typora</code>（推荐使用）</p>
<p><code>sudo pacman -S remarkable</code></p>
<p><code>yaourt -S haroopad</code></p>
<p><code>sudo pacman -S retext</code></p>
<h3 id="安装git"><a href="#安装git" class="headerlink" title="安装git"></a>安装git</h3><p><code>sudo pacman -S git</code></p>
<p>设置个人github信息</p>
<p><code>git config --global user.name &quot;github昵称&quot;</code></p>
<p><code>git config --global user.email &quot;注册邮箱&quot;</code></p>
<h3 id="安装smartGit"><a href="#安装smartGit" class="headerlink" title="安装smartGit"></a>安装smartGit</h3><p>一个Git客户端。archlinux/manjaro的主源里就有它。</p>
<p><code>yaout -S smartgit</code></p>
<h3 id="安装图形化的解压软件"><a href="#安装图形化的解压软件" class="headerlink" title="安装图形化的解压软件"></a>安装图形化的解压软件</h3><p><code>sudo pacman -S p7zip file-roller unrar</code></p>
<h3 id="安装bat替代cat"><a href="#安装bat替代cat" class="headerlink" title="安装bat替代cat"></a>安装bat替代cat</h3><p><code>sudo pacman -S bat</code></p>
<h3 id="安装护眼软件红移redshift"><a href="#安装护眼软件红移redshift" class="headerlink" title="安装护眼软件红移redshift"></a>安装护眼软件红移redshift</h3><p><code>sudo pacman -S redshift</code></p>
<h3 id="安装gnome磁盘管理"><a href="#安装gnome磁盘管理" class="headerlink" title="安装gnome磁盘管理"></a>安装gnome磁盘管理</h3><p><code>sudo pacman -S gnome-disk-utility</code></p>
<h3 id="安装截图软件（可编辑）"><a href="#安装截图软件（可编辑）" class="headerlink" title="安装截图软件（可编辑）"></a>安装截图软件（可编辑）</h3><p><code>yaourt -S hotshots</code></p>
<p><strong>注意</strong>：因为网络问题，这里可能需要对PKGBUILD做一些修改，将http改为https。</p>
<h3 id="安装google浏览器"><a href="#安装google浏览器" class="headerlink" title="安装google浏览器"></a>安装google浏览器</h3><p><code>sudo pacman -S google-chrome</code></p>
<h3 id="安装uGet"><a href="#安装uGet" class="headerlink" title="安装uGet"></a>安装uGet</h3><p>Linux 下最好的下载管理器</p>
<p><code>sudo pacman -S uget</code></p>
<h3 id="安装网易云音乐"><a href="#安装网易云音乐" class="headerlink" title="安装网易云音乐"></a>安装网易云音乐</h3><p><code>yaourt -S netease-cloud-music</code></p>
<h3 id="安装osdlyrics（本地音乐播放器显示歌词需要）"><a href="#安装osdlyrics（本地音乐播放器显示歌词需要）" class="headerlink" title="安装osdlyrics（本地音乐播放器显示歌词需要）"></a>安装osdlyrics（本地音乐播放器显示歌词需要）</h3><p><code>sudo pacman -S osdlyrics</code></p>
<h3 id="安装WPS-office"><a href="#安装WPS-office" class="headerlink" title="安装WPS-office"></a>安装WPS-office</h3><p><code>sudo pacman -S wps-office</code></p>
<h3 id="安装有道词典"><a href="#安装有道词典" class="headerlink" title="安装有道词典"></a>安装有道词典</h3><p>有道词典。</p>
<p><code>yaourt -S youdao-dict</code></p>
<h3 id="安装ClamAV"><a href="#安装ClamAV" class="headerlink" title="安装ClamAV"></a>安装ClamAV</h3><p>Clam 防病毒软件（命令行）</p>
<p><code>sudo pacman -S clamav</code></p>
<p>Clam 防病毒软件（客户端）</p>
<p><code>sudo pacman -S clamtk</code></p>
<h3 id="安装sublime-text-3"><a href="#安装sublime-text-3" class="headerlink" title="安装sublime-text-3"></a>安装sublime-text-3</h3><p>输入法修复版本</p>
<p><code>yaourt -S sublime-text-3-imfix</code></p>
<p><em>如果默认的拼音输入法还是无法使用，需要安装其他中文输入法。如谷歌拼音/搜狗拼音等。</em></p>
<h3 id="安装虚拟机"><a href="#安装虚拟机" class="headerlink" title="安装虚拟机"></a>安装虚拟机</h3><p><code>yaourt -S vmware-workstation</code></p>
<p><strong>注意：</strong>如果出现vmmod找不到的问题，需要安装linux-headers后再一次安装，之后重新登陆后即可。</p>
<h3 id="安装QQ"><a href="#安装QQ" class="headerlink" title="安装QQ"></a>安装QQ</h3><p><code>yaourt -S deepin.com.qq.im</code></p>
<h3 id="安装Tim"><a href="#安装Tim" class="headerlink" title="安装Tim"></a>安装Tim</h3><p><code>yaourt -S deepin.com.qq.office</code></p>
<h3 id="安装微信"><a href="#安装微信" class="headerlink" title="安装微信"></a>安装微信</h3><p>微信，公认最好的，是electronic-wechat。</p>
<h4 id="命令直接安装"><a href="#命令直接安装" class="headerlink" title="命令直接安装"></a>命令直接安装</h4><p><code>yaourt -S electronic-wechat</code></p>
<h4 id="源码编译安装"><a href="#源码编译安装" class="headerlink" title="源码编译安装"></a>源码编译安装</h4><p>在下载和运行这个项目之前，你需要在电脑上安装 <a href="https://git-scm.com/" target="_blank" rel="noopener">Git</a> 和 <a href="https://nodejs.org/en/download/" target="_blank" rel="noopener">Node.js</a> (来自 <a href="https://www.npmjs.com/" target="_blank" rel="noopener">npm</a>)。在命令行中输入:</p>
<ul>
<li>下载仓库</li>
</ul>
<p><code>git clone https://github.com/geeeeeeeeek/electronic-wechat.git</code></p>
<ul>
<li>进入源码目录</li>
</ul>
<p><code>cd electronic-wechat</code></p>
<ul>
<li>安装, 运行应用</li>
</ul>
<p><code>sudo npm install &amp;&amp; sudo npm start</code></p>
<ul>
<li>根据你的平台打包应用:</li>
</ul>
<p><code>sudo npm run build:linux</code></p>
<h4 id="使用发布版"><a href="#使用发布版" class="headerlink" title="使用发布版"></a>使用发布版</h4><p><a href="https://github.com/geeeeeeeeek/electronic-wechat/releases" target="_blank" rel="noopener">开箱即用的稳定版应用</a></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">tar xvf electronic-wechat-linux-x64.tar.gz</span><br><span class="line"><span class="built_in">cd</span> electronic-wechat-linux-x64</span><br><span class="line">./electronic-wechat %U</span><br></pre></td></tr></table></figure>
<p>可以给他添加快捷方式</p>
<h3 id="安装oh-my-zsh"><a href="#安装oh-my-zsh" class="headerlink" title="安装oh my zsh"></a>安装oh my zsh</h3><h4 id="查看系统是否安装了zsh"><a href="#查看系统是否安装了zsh" class="headerlink" title="查看系统是否安装了zsh"></a>查看系统是否安装了zsh</h4><p><code>cat /etc/shells</code></p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> Pathnames of valid login shells.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> See shells(5) <span class="keyword">for</span> details.</span></span><br><span class="line"></span><br><span class="line">/bin/sh</span><br><span class="line">/bin/bash</span><br><span class="line">/bin/zsh</span><br><span class="line">/usr/bin/zsh</span><br><span class="line">/usr/bin/git-shell</span><br></pre></td></tr></table></figure>
<ul>
<li><p>如果已经安装zsh,则会多出来以下条目</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">/bin/zsh</span><br><span class="line">/usr/bin/zsh</span><br></pre></td></tr></table></figure>
</li>
</ul>
<h4 id="查看系统当前使用的shell"><a href="#查看系统当前使用的shell" class="headerlink" title="查看系统当前使用的shell"></a>查看系统当前使用的shell</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> <span class="built_in">echo</span> <span class="variable">$SHELL</span></span></span><br><span class="line">/bin/bash</span><br></pre></td></tr></table></figure>
<h4 id="切换shell为zsh"><a href="#切换shell为zsh" class="headerlink" title="切换shell为zsh"></a>切换shell为zsh</h4><p><code>$ chsh -s /bin/zsh</code></p>
<p>如果要切换回去bash：</p>
<p><code>chsh -s /bin/bash</code></p>
<p>重启生效,如下所示:</p>
<div><div class="fold_hider"><div class="close hider_title">点击显示/隐藏内容</div></div><div class="fold">
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">......</span><br><span class="line">This is the Z Shell configuration function for new users,</span><br><span class="line">zsh-newuser-install.</span><br><span class="line">You are seeing this message because you have no zsh startup files</span><br><span class="line">(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory</span><br><span class="line">~).  This function can help you with a few settings that should</span><br><span class="line">make your use of the shell easier.</span><br><span class="line"></span><br><span class="line">You can:</span><br><span class="line"></span><br><span class="line">(q)  Quit and do nothing.  The function will be run again next time.</span><br><span class="line"></span><br><span class="line">(0)  Exit, creating the file ~/.zshrc containing just a comment.</span><br><span class="line">     That will prevent this function being run again.</span><br><span class="line"></span><br><span class="line">(1)  Continue to the main menu.</span><br><span class="line"></span><br><span class="line">--- Type one of the keys in parentheses --- 0</span><br><span class="line"><span class="meta">mjroXfce18%</span><span class="bash"></span></span><br></pre></td></tr></table></figure>

</div></div>
<ul>
<li>查看当前shell</li>
</ul>
<p><code>$ echo $SHELL</code></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">/bin/zsh</span><br></pre></td></tr></table></figure>
<h4 id="下载安装-oh-my-zsh"><a href="#下载安装-oh-my-zsh" class="headerlink" title="下载安装 oh my zsh"></a>下载安装 oh my zsh</h4><p><code>wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh</code></p>
<p>完成后如下所示:</p>
<div><div class="fold_hider"><div class="close hider_title">点击显示/隐藏内容</div></div><div class="fold">
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">......</span><br><span class="line">Looking for an existing zsh config...</span><br><span class="line">Found ~/.zshrc. Backing up to ~/.zshrc.pre-oh-my-zsh</span><br><span class="line">Using the Oh My Zsh template file and adding it to ~/.zshrc</span><br><span class="line">         __                                     __   </span><br><span class="line">  ____  / /_     ____ ___  __  __   ____  _____/ /_  </span><br><span class="line"> / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \ </span><br><span class="line">/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / / </span><br><span class="line">\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/  </span><br><span class="line">                        /____/                       ....is now installed!</span><br><span class="line"></span><br><span class="line">Please look over the ~/.zshrc file to select plugins, themes, and options.</span><br><span class="line"></span><br><span class="line">p.s. Follow us at https://twitter.com/ohmyzsh.</span><br><span class="line"></span><br><span class="line">p.p.s. Get stickers and t-shirts at https://shop.planetargon.com.</span><br><span class="line"></span><br><span class="line"><span class="meta">mjroXfce18%</span><span class="bash"></span></span><br></pre></td></tr></table></figure>

</div></div>
<h4 id="配置oh-my-zsh"><a href="#配置oh-my-zsh" class="headerlink" title="配置oh my zsh"></a>配置oh my zsh</h4><ul>
<li>安装autojump自动跳转插件</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S autojump</span><br><span class="line">echo ". /usr/share/autojump/autojump.zsh" &gt;&gt; $&#123;ZDOTDIR:-$HOME&#125;/.zshrc</span><br><span class="line">source .zshrc</span><br></pre></td></tr></table></figure>
<ul>
<li>安装zsh-syntax-highlighting语法高亮插件</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting</span><br><span class="line">echo "source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" &gt;&gt; $&#123;ZDOTDIR:-$HOME&#125;/.zshrc</span><br><span class="line">source .zshrc</span><br></pre></td></tr></table></figure>
<ul>
<li>安装zsh-autosuggestions语法历史记录插件</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions</span><br><span class="line">echo "source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" &gt;&gt; $&#123;ZDOTDIR:-$HOME&#125;/.zshrc</span><br><span class="line">source .zshrc</span><br></pre></td></tr></table></figure>
<ul>
<li>安装自动补全插件incr</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">cd $ZSH_CUSTOM/plugins</span><br><span class="line">mkdir incr</span><br><span class="line">cd incr</span><br><span class="line">wget http://mimosa-pudica.net/src/incr-0.2.zsh</span><br><span class="line">echo "source $ZSH_CUSTOM/plugins/incr/incr*.zsh" &gt;&gt; $&#123;ZDOTDIR:-$HOME&#125;/.zshrc</span><br><span class="line">source .zshrc</span><br></pre></td></tr></table></figure>
<p><img src="https://img2018.cnblogs.com/blog/1548353/201812/1548353-20181215111451681-1556416322.png" alt=""></p>
<p>详细的.zshrc请参见附录IV。</p>
<ul>
<li>修改主题</li>
</ul>
<p>修改.zshrc文件</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vim ~.zshrc</span><br></pre></td></tr></table></figure>
<p>找到ZSH_THEME=“robbyrussell”，修改为：ZSH_THEME=“ys”；</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">......</span><br><span class="line">ZSH_THEME="ys"</span><br><span class="line">......</span><br></pre></td></tr></table></figure>
<p>更新配置</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">source .zshrc</span><br></pre></td></tr></table></figure>
<h2 id="XFCE图标主题美化"><a href="#XFCE图标主题美化" class="headerlink" title="XFCE图标主题美化"></a>XFCE图标主题美化</h2><h3 id="安装图标"><a href="#安装图标" class="headerlink" title="安装图标"></a>安装图标</h3><p><code>yaourt -S numix-circle-icon-theme-git</code></p>
<p><code>sudo pacman -S papirus-icon-theme</code></p>
<h3 id="安装主题"><a href="#安装主题" class="headerlink" title="安装主题"></a>安装主题</h3><p><code>sudo pacman -S arc-gtk-theme</code></p>
<h3 id="设置"><a href="#设置" class="headerlink" title="设置"></a>设置</h3><ul>
<li>主题：设置——》外观——》样式——》arc</li>
<li>图标：设置——》外观——》图标——》numix circle</li>
</ul>
<h2 id="优化系统启动速度"><a href="#优化系统启动速度" class="headerlink" title="优化系统启动速度"></a>优化系统启动速度</h2><p>Arch Linux 的 systemd-analyze 是个很不错的工具，利用它你可以很直观地观察到系统启动的时间都花到哪儿去了：</p>
<p><code>systemd-analyze</code></p>
<p>我注意到打开 AHCI 后，内核和用户空间的载入速度明显提高了，总启动时间从约 30 秒缩短到 20 秒，效果非常明显。</p>
<p>用下面这个命令，可以了解到是什么东西启动最慢：</p>
<p><code>systemd-analyze blame</code></p>
<p>此外，还可以把启动过程绘制成 SVG 图表供你审阅（用 GNOME 的图片预览或 Chrome 浏览器都可以打开），这个图表中你还可以观察到是否有启动慢的组件影响到了依赖它的组件的启动：</p>
<p><code>systemd-analyze plot &gt; plot.svg</code></p>
<h2 id="将npm的注册表源设置为国内的镜像"><a href="#将npm的注册表源设置为国内的镜像" class="headerlink" title="将npm的注册表源设置为国内的镜像"></a>将npm的注册表源设置为国内的镜像</h2><p>国内用户，建议将npm的注册表源设置为国内的镜像，可以大幅提升安装速度。</p>
<ul>
<li>淘宝npm镜像</li>
</ul>
<blockquote>
<p>  搜索地址：<a href="http://npm.taobao.org/" target="_blank" rel="noopener">http://npm.taobao.org/</a></p>
</blockquote>
<blockquote>
<p>  registry地址：<a href="http://registry.npm.taobao.org/" target="_blank" rel="noopener">http://registry.npm.taobao.org/</a></p>
</blockquote>
<ul>
<li>cnpmjs镜像</li>
</ul>
<blockquote>
<p>  搜索地址：<a href="http://cnpmjs.org/" target="_blank" rel="noopener">http://cnpmjs.org/</a></p>
</blockquote>
<blockquote>
<p>  registry地址：<a href="http://r.cnpmjs.org/" target="_blank" rel="noopener">http://r.cnpmjs.org/</a></p>
</blockquote>
<ul>
<li>临时使用</li>
</ul>
<p><code>npm --registry https://registry.npm.taobao.org install express</code></p>
<ul>
<li>持久使用</li>
</ul>
<p><code>npm config set registry https://registry.npm.taobao.org</code></p>
<ul>
<li><p>配置后可通过下面方式来验证是否成功<br><code>npm config get registry</code><br>或<br><code>npm info express</code></p>
</li>
<li><p>通过cnpm(<em>可能需要加上sudo</em>)</p>
<p><code>npm install -g cnpm --registry=https://registry.npm.taobao.org</code></p>
</li>
<li><p>使用<br><code>cnpm install express</code></p>
</li>
</ul>
<p>我使用的是cnpm.如下图:</p>
<p><img src="https://img2018.cnblogs.com/blog/1548353/201812/1548353-20181215111158407-1723419260.png" alt=""></p>
<h2 id="问题与解决"><a href="#问题与解决" class="headerlink" title="问题与解决"></a>问题与解决</h2><h3 id="安装中遇到的问题"><a href="#安装中遇到的问题" class="headerlink" title="安装中遇到的问题"></a>安装中遇到的问题</h3><ul>
<li><p>安装时一直停在“正在加载位置数据”</p>
<p>解决办法：先把网络连接都断开，再启动安装，等地图位置加载完成后，再联网继续安装。</p>
</li>
</ul>
<h3 id="警告：xxx本地比xxx的版本更新"><a href="#警告：xxx本地比xxx的版本更新" class="headerlink" title="警告：xxx本地比xxx的版本更新"></a>警告：xxx本地比xxx的版本更新</h3><p>例如，加入archlinuxcn中文社区库后，执行sudo pacman -Syu升级系统后，出现如下问题：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">......</span><br><span class="line">警告：cower：本地 (18-2) 比 extra 的版本更新 (18-1)</span><br><span class="line">警告：inxi：本地 (3.0.29-1) 比 community 的版本更新 (3.0.28-1)</span><br><span class="line">警告：lib32-qt4：本地 (4.8.7-14) 比 multilib 的版本更新 (4.8.7-13)</span><br><span class="line">警告：libxpresent：本地 (1.0.0+3+g9d31d21-1) 比 extra 的版本更新 (1.0.0+2+gdd6771c-1)</span><br><span class="line">警告：package-query：本地 (1.9-3) 比 extra 的版本更新 (1.9-2)</span><br><span class="line">......</span><br></pre></td></tr></table></figure>
<h4 id="解决办法"><a href="#解决办法" class="headerlink" title="解决办法"></a>解决办法</h4><p>该问题一般出现在：启用了多个镜像（比如同时使用manjaro官方库和archlinuxcn中文社区库），或者刚切换了镜像，然后执行升级系统命令。</p>
<p>该问题可以忽略，因为archlinuxcn中文社区库里面的版本要比manjaro官方库里面的版本更新，升级后本地的版本就是使用archlinuxcn中文社区库里面的最新版本。</p>
<p>例如：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">$ pacman -Ss cower</span><br><span class="line">extra/cower 18-1 [已安装: 18-2]</span><br><span class="line">    A simple AUR agent with a pretentious name</span><br><span class="line">archlinuxcn/cower 18-2 [已安装]</span><br><span class="line">    A simple AUR agent with a pretentious name</span><br></pre></td></tr></table></figure>
<p>当然，也可以给软件包降级：</p>
<ul>
<li><p>使用pacman的临时文件（安装本地包）降级</p>
<p>如果一个新包刚刚被安装并且没有删除<a href="https://wiki.archlinux.org/index.php/Pacman#Cleaning_the_package_cache" target="_blank" rel="noopener">pacman cache</a>,你可以在<code>/var/cache/pacman/pkg/</code>中找到较早版本. 安装替换现有的版本.</p>
<p><a href="https://wiki.archlinux.org/index.php/Pacman" target="_blank" rel="noopener">pacman</a>会处理依赖包但不会处理依赖库的版本冲突。如果一个其依赖库因该包降级需要降级，你需要手动降级这些包。</p>
<p><code>pacman -U /var/cache/pacman/pkg/package-old_version.pkg.tar.xz</code></p>
</li>
<li><p>使用远程包（安装远程包）降级</p>
<p><code>pacman -U http://www.example.com/repo/package-old_version.pkg.tar.xz</code></p>
</li>
</ul>
<h3 id="aria2c下载xxx-db-sig出现错误"><a href="#aria2c下载xxx-db-sig出现错误" class="headerlink" title="aria2c下载xxx.db.sig出现错误"></a>aria2c下载xxx.db.sig出现错误</h3><div><div class="fold_hider"><div class="close hider_title">点击显示/隐藏内容</div></div><div class="fold">
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> elinuxboy @ mjro18xfce <span class="keyword">in</span> ~ [7:53:20] </span></span><br><span class="line"><span class="meta">$</span><span class="bash"> sudo pacman -Sy</span></span><br><span class="line">[sudo] elinuxboy 的密码：</span><br><span class="line">:: 正在同步软件包数据库...</span><br><span class="line"></span><br><span class="line">12/15 07:53:25 [NOTICE] Downloading 1 item(s)</span><br><span class="line"></span><br><span class="line">12/15 07:53:26 [NOTICE] 下载已完成：/var/lib/pacman/sync/core.db.part</span><br><span class="line"></span><br><span class="line">下载结果：</span><br><span class="line">gid   |stat|avg speed  |path/URI</span><br><span class="line">======+====+===========+=======================================================</span><br><span class="line">e48729|OK  |   589KiB/s|/var/lib/pacman/sync/core.db.part</span><br><span class="line"></span><br><span class="line">状态标识：</span><br><span class="line">(OK)：下载已完成。</span><br><span class="line"></span><br><span class="line">12/15 07:53:26 [NOTICE] Downloading 1 item(s)</span><br><span class="line"></span><br><span class="line">12/15 07:53:26 [ERROR] CUID#7 - Download aborted. URI=https://mirrors.ustc.edu.cn/manjaro/stable/core/x86_64/core.db.sig</span><br><span class="line">Exception: [AbstractCommand.cc:351] errorCode=3 URI=https://mirrors.ustc.edu.cn/manjaro/stable/core/x86_64/core.db.sig</span><br><span class="line"><span class="meta">  -&gt;</span><span class="bash"> [HttpSkipResponseCommand.cc:219] errorCode=3 未找到资源</span></span><br><span class="line"></span><br><span class="line">12/15 07:53:26 [NOTICE] GID 为 3ec1fe753480d611 的下载项未完成：/var/lib/pacman/sync/core.db.sig.part</span><br><span class="line"></span><br><span class="line">下载结果：</span><br><span class="line">gid   |stat|avg speed  |path/URI</span><br><span class="line">======+====+===========+=======================================================</span><br><span class="line">3ec1fe|ERR |       0B/s|/var/lib/pacman/sync/core.db.sig.part</span><br><span class="line"></span><br><span class="line">状态标识：</span><br><span class="line">(ERR)：发生错误。</span><br><span class="line"></span><br><span class="line">重新启动aria2，自动继续下载文件</span><br><span class="line">如果发生任何错误，请参阅日志文件。要了解详细信息，请在 help/man 页面中参阅“-l”选项。</span><br><span class="line"></span><br><span class="line">12/15 07:53:28 [NOTICE] Downloading 1 item(s)</span><br><span class="line"><span class="meta">[#</span><span class="bash">58174d 1.7MiB/1.8MiB(95%) CN:1 DL:1.0MiB]                                    </span></span><br><span class="line">12/15 07:53:30 [NOTICE] 下载已完成：/var/lib/pacman/sync/extra.db.part</span><br><span class="line"></span><br><span class="line">下载结果：</span><br><span class="line">gid   |stat|avg speed  |path/URI</span><br><span class="line">======+====+===========+=======================================================</span><br><span class="line">58174d|OK  |   1.0MiB/s|/var/lib/pacman/sync/extra.db.part</span><br><span class="line"></span><br><span class="line">状态标识：</span><br><span class="line">(OK)：下载已完成。</span><br><span class="line"></span><br><span class="line">12/15 07:53:30 [NOTICE] Downloading 1 item(s)</span><br><span class="line"></span><br><span class="line">12/15 07:53:31 [ERROR] CUID#7 - Download aborted. URI=https://mirrors.ustc.edu.cn/manjaro/stable/extra/x86_64/extra.db.sig</span><br><span class="line">Exception: [AbstractCommand.cc:351] errorCode=3 URI=https://mirrors.ustc.edu.cn/manjaro/stable/extra/x86_64/extra.db.sig</span><br><span class="line"><span class="meta">  -&gt;</span><span class="bash"> [HttpSkipResponseCommand.cc:219] errorCode=3 未找到资源</span></span><br><span class="line"></span><br><span class="line">12/15 07:53:31 [NOTICE] GID 为 5da8892ce4724c98 的下载项未完成：/var/lib/pacman/sync/extra.db.sig.part</span><br><span class="line"></span><br><span class="line">下载结果：</span><br><span class="line">gid   |stat|avg speed  |path/URI</span><br><span class="line">======+====+===========+=======================================================</span><br><span class="line">5da889|ERR |       0B/s|/var/lib/pacman/sync/extra.db.sig.part</span><br><span class="line"></span><br><span class="line">状态标识：</span><br><span class="line">(ERR)：发生错误。</span><br><span class="line"></span><br><span class="line">重新启动aria2，自动继续下载文件</span><br><span class="line">如果发生任何错误，请参阅日志文件。要了解详细信息，请在 help/man 页面中参阅“-l”选项。</span><br><span class="line"></span><br><span class="line">12/15 07:53:33 [NOTICE] Downloading 1 item(s)</span><br><span class="line"><span class="meta">[#</span><span class="bash">d66d80 4.5MiB/5.0MiB(90%) CN:1 DL:0.9MiB]                                    </span></span><br><span class="line">12/15 07:53:38 [NOTICE] 下载已完成：/var/lib/pacman/sync/community.db.part</span><br><span class="line"></span><br><span class="line">下载结果：</span><br><span class="line">gid   |stat|avg speed  |path/URI</span><br><span class="line">======+====+===========+=======================================================</span><br><span class="line">d66d80|OK  |   1.0MiB/s|/var/lib/pacman/sync/community.db.part</span><br><span class="line"></span><br><span class="line">状态标识：</span><br><span class="line">(OK)：下载已完成。</span><br><span class="line"></span><br><span class="line">12/15 07:53:38 [NOTICE] Downloading 1 item(s)</span><br><span class="line"></span><br><span class="line">12/15 07:53:38 [ERROR] CUID#7 - Download aborted. URI=https://mirrors.ustc.edu.cn/manjaro/stable/community/x86_64/community.db.sig</span><br><span class="line">Exception: [AbstractCommand.cc:351] errorCode=3 URI=https://mirrors.ustc.edu.cn/manjaro/stable/community/x86_64/community.db.sig</span><br><span class="line"><span class="meta">  -&gt;</span><span class="bash"> [HttpSkipResponseCommand.cc:219] errorCode=3 未找到资源</span></span><br><span class="line"></span><br><span class="line">12/15 07:53:38 [NOTICE] GID 为 44b66925e8f1286f 的下载项未完成：/var/lib/pacman/sync/community.db.sig.part</span><br><span class="line"></span><br><span class="line">下载结果：</span><br><span class="line">gid   |stat|avg speed  |path/URI</span><br><span class="line">======+====+===========+=======================================================</span><br><span class="line">44b669|ERR |       0B/s|/var/lib/pacman/sync/community.db.sig.part</span><br><span class="line"></span><br><span class="line">状态标识：</span><br><span class="line">(ERR)：发生错误。</span><br><span class="line"></span><br><span class="line">重新启动aria2，自动继续下载文件</span><br><span class="line">如果发生任何错误，请参阅日志文件。要了解详细信息，请在 help/man 页面中参阅“-l”选项。</span><br><span class="line"></span><br><span class="line">12/15 07:53:40 [NOTICE] Downloading 1 item(s)</span><br><span class="line"></span><br><span class="line">12/15 07:53:41 [NOTICE] 下载已完成：/var/lib/pacman/sync/multilib.db.part</span><br><span class="line"></span><br><span class="line">下载结果：</span><br><span class="line">gid   |stat|avg speed  |path/URI</span><br><span class="line">======+====+===========+=======================================================</span><br><span class="line">a00c29|OK  |   722KiB/s|/var/lib/pacman/sync/multilib.db.part</span><br><span class="line"></span><br><span class="line">状态标识：</span><br><span class="line">(OK)：下载已完成。</span><br><span class="line"></span><br><span class="line">12/15 07:53:41 [NOTICE] Downloading 1 item(s)</span><br><span class="line"></span><br><span class="line">12/15 07:53:41 [ERROR] CUID#7 - Download aborted. URI=https://mirrors.ustc.edu.cn/manjaro/stable/multilib/x86_64/multilib.db.sig</span><br><span class="line">Exception: [AbstractCommand.cc:351] errorCode=3 URI=https://mirrors.ustc.edu.cn/manjaro/stable/multilib/x86_64/multilib.db.sig</span><br><span class="line"><span class="meta">  -&gt;</span><span class="bash"> [HttpSkipResponseCommand.cc:219] errorCode=3 未找到资源</span></span><br><span class="line"></span><br><span class="line">12/15 07:53:41 [NOTICE] GID 为 96eb7b68d9be8b5d 的下载项未完成：/var/lib/pacman/sync/multilib.db.sig.part</span><br><span class="line"></span><br><span class="line">下载结果：</span><br><span class="line">gid   |stat|avg speed  |path/URI</span><br><span class="line">======+====+===========+=======================================================</span><br><span class="line">96eb7b|ERR |       0B/s|/var/lib/pacman/sync/multilib.db.sig.part</span><br><span class="line"></span><br><span class="line">状态标识：</span><br><span class="line">(ERR)：发生错误。</span><br><span class="line"></span><br><span class="line">重新启动aria2，自动继续下载文件</span><br><span class="line">如果发生任何错误，请参阅日志文件。要了解详细信息，请在 help/man 页面中参阅“-l”选项。</span><br></pre></td></tr></table></figure>

</div></div>
<h4 id="解决办法-1"><a href="#解决办法-1" class="headerlink" title="解决办法"></a>解决办法</h4><p>xxx.db.sig 缺失是 database 的签名缺失，这是正常的，现在都只验证 package 的签名，database 都不签名了。</p>
<p>在官方仓库和archlinuxcn中文社区库里已经没有xxx.db.sig文件了，所以当然下载不到。</p>
<h3 id="错误：无法注册-‘archlinuxcn’-数据库-数据库已登记"><a href="#错误：无法注册-‘archlinuxcn’-数据库-数据库已登记" class="headerlink" title="错误：无法注册 ‘archlinuxcn’ 数据库 (数据库已登记)"></a>错误：无法注册 ‘archlinuxcn’ 数据库 (数据库已登记)</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">......</span><br><span class="line">error: could not register <span class="string">'archlinuxcn'</span> database (database already registered)</span><br><span class="line">error: could not register <span class="string">'archlinuxcn'</span> database (database already registered)</span><br><span class="line">error: could not register <span class="string">'archlinuxcn'</span> database (database already registered)</span><br><span class="line">could not register <span class="string">'archlinuxcn'</span> database (database already registered)</span><br><span class="line">错误：无法注册 <span class="string">'archlinuxcn'</span> 数据库 (数据库已登记)</span><br><span class="line">错误：无法注册 <span class="string">'archlinuxcn'</span> 数据库 (数据库已登记)</span><br><span class="line">错误：无法注册 <span class="string">'archlinuxcn'</span> 数据库 (数据库已登记)</span><br><span class="line">......</span><br></pre></td></tr></table></figure>
<p>该问题一般出现在添加archlinuxcn中文社区库的时候添加错文件了，应该是在这个文件“==/etc/pacman.conf==”后面添加archlinuxcn中文社区库，而不是在这个“/etc/pacman.d/mirrorlist”文件后添加。</p>
<p><img src="https://img2018.cnblogs.com/blog/1548353/201812/1548353-20181215111136319-520114191.png" alt=""></p>
<h2 id="附录I：-etc-pacman-conf"><a href="#附录I：-etc-pacman-conf" class="headerlink" title="附录I：/etc/pacman.conf"></a>附录I：/etc/pacman.conf</h2><div><div class="fold_hider"><div class="close hider_title">点击显示/隐藏内容</div></div><div class="fold">
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> /etc/pacman.conf</span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> See the pacman.conf(5) manpage <span class="keyword">for</span> option and repository directives</span></span><br><span class="line"></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> GENERAL OPTIONS</span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line">[options]</span><br><span class="line"><span class="meta">#</span><span class="bash"> The following paths are commented out with their default values listed.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> If you wish to use different paths, uncomment and update the paths.</span></span><br><span class="line"><span class="meta">#</span><span class="bash">RootDir     = /</span></span><br><span class="line"><span class="meta">#</span><span class="bash">DBPath      = /var/lib/pacman/</span></span><br><span class="line">CacheDir = /var/cache/pacman/pkg/</span><br><span class="line"><span class="meta">#</span><span class="bash">LogFile     = /var/<span class="built_in">log</span>/pacman.log</span></span><br><span class="line"><span class="meta">#</span><span class="bash">GPGDir      = /etc/pacman.d/gnupg/</span></span><br><span class="line"><span class="meta">#</span><span class="bash">HookDir     = /etc/pacman.d/hooks/</span></span><br><span class="line">HoldPkg      = pacman glibc manjaro-system</span><br><span class="line"><span class="meta">#</span><span class="bash"> If upgrades are available <span class="keyword">for</span> these packages they will be asked <span class="keyword">for</span> first</span></span><br><span class="line">SyncFirst    = manjaro-system archlinux-keyring manjaro-keyring</span><br><span class="line"><span class="meta">#</span><span class="bash">XferCommand = /usr/bin/curl -C - -f %u &gt; %o</span></span><br><span class="line"><span class="meta">#</span><span class="bash">XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> aria2c 多线程多链接</span></span><br><span class="line"><span class="meta">#</span><span class="bash">XferCommand = /usr/bin/aria2c --allow-overwrite=<span class="literal">true</span> --<span class="built_in">log</span>-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 -d $(dirname %o) -o $(basename %o) %u</span></span><br><span class="line"><span class="meta">#</span><span class="bash">CleanMethod = KeepInstalled</span></span><br><span class="line"><span class="meta">#</span><span class="bash">UseDelta    = 0.7</span></span><br><span class="line">Architecture = auto</span><br><span class="line"><span class="meta">#</span><span class="bash"> 下载进度条吃豆子方式</span></span><br><span class="line">ILoveCandy</span><br><span class="line"></span><br><span class="line"><span class="meta">#</span><span class="bash"> Pacman won<span class="string">'t upgrade packages listed in IgnorePkg and members of IgnoreGroup</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">IgnorePkg   =</span></span><br><span class="line"><span class="meta">#</span><span class="bash">IgnoreGroup =</span></span><br><span class="line"></span><br><span class="line"><span class="meta">#</span><span class="bash">NoUpgrade   =</span></span><br><span class="line"><span class="meta">#</span><span class="bash">NoExtract   =</span></span><br><span class="line"></span><br><span class="line"><span class="meta">#</span><span class="bash"> Misc options</span></span><br><span class="line"><span class="meta">#</span><span class="bash">UseSyslog</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> 彩色输出</span></span><br><span class="line">Color</span><br><span class="line"><span class="meta">#</span><span class="bash">TotalDownload</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> We cannot check disk space from within a chroot environment</span></span><br><span class="line">CheckSpace</span><br><span class="line"><span class="meta">#</span><span class="bash"> 升级前对比版本</span></span><br><span class="line">VerbosePkgLists</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> By default, pacman accepts packages signed by keys that its <span class="built_in">local</span> keyring</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> trusts (see pacman-key and its man page), as well as unsigned packages.</span></span><br><span class="line">SigLevel    = Required DatabaseOptional</span><br><span class="line">LocalFileSigLevel = Optional</span><br><span class="line"><span class="meta">#</span><span class="bash">RemoteFileSigLevel = Required</span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> NOTE: You must run `pacman-key --init` before first using pacman; the <span class="built_in">local</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> keyring can <span class="keyword">then</span> be populated with the keys of all official Manjaro Linux</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> packagers with `pacman-key --populate archlinux manjaro`.</span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> REPOSITORIES</span></span><br><span class="line"><span class="meta">#</span><span class="bash">   - can be defined here or included from another file</span></span><br><span class="line"><span class="meta">#</span><span class="bash">   - pacman will search repositories <span class="keyword">in</span> the order defined here</span></span><br><span class="line"><span class="meta">#</span><span class="bash">   - <span class="built_in">local</span>/custom mirrors can be added here or <span class="keyword">in</span> separate files</span></span><br><span class="line"><span class="meta">#</span><span class="bash">   - repositories listed first will take precedence when packages</span></span><br><span class="line"><span class="meta">#</span><span class="bash">     have identical names, regardless of version number</span></span><br><span class="line"><span class="meta">#</span><span class="bash">   - URLs will have <span class="variable">$repo</span> replaced by the name of the current repo</span></span><br><span class="line"><span class="meta">#</span><span class="bash">   - URLs will have <span class="variable">$arch</span> replaced by the name of the architecture</span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> Repository entries are of the format:</span></span><br><span class="line"><span class="meta">#</span><span class="bash">       [repo-name]</span></span><br><span class="line"><span class="meta">#</span><span class="bash">       Server = ServerName</span></span><br><span class="line"><span class="meta">#</span><span class="bash">       Include = IncludePath</span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> The header [repo-name] is crucial - it must be present and</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> uncommented to <span class="built_in">enable</span> the repo.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> The testing repositories are disabled by default. To <span class="built_in">enable</span>, uncomment the</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> repo name header and Include lines. You can add preferred servers immediately</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> after the header, and they will be used before the default mirrors.</span></span><br><span class="line"> </span><br><span class="line">[core]</span><br><span class="line">SigLevel = PackageRequired</span><br><span class="line">Include = /etc/pacman.d/mirrorlist</span><br><span class="line"> </span><br><span class="line">[extra]</span><br><span class="line">SigLevel = PackageRequired</span><br><span class="line">Include = /etc/pacman.d/mirrorlist</span><br><span class="line"> </span><br><span class="line">[community]</span><br><span class="line">SigLevel = PackageRequired</span><br><span class="line">Include = /etc/pacman.d/mirrorlist</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> If you want to run 32 bit applications on your x86_64 system,</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">enable</span> the multilib repositories as required here.</span></span><br><span class="line"> </span><br><span class="line">[multilib]</span><br><span class="line">SigLevel = PackageRequired</span><br><span class="line">Include = /etc/pacman.d/mirrorlist</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> An example of a custom package repository.  See the pacman manpage <span class="keyword">for</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> tips on creating your own repositories.</span></span><br><span class="line"><span class="meta">#</span><span class="bash">[custom]</span></span><br><span class="line"><span class="meta">#</span><span class="bash">SigLevel = Optional TrustAll</span></span><br><span class="line"><span class="meta">#</span><span class="bash">Server = file:///home/custompkgs</span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> archlinuxcn中文社区库清华大学镜像</span></span><br><span class="line">[archlinuxcn]</span><br><span class="line">Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch</span><br></pre></td></tr></table></figure>

</div></div>
<h2 id="附录II：-etc-makepkg-conf"><a href="#附录II：-etc-makepkg-conf" class="headerlink" title="附录II：/etc/makepkg.conf"></a>附录II：/etc/makepkg.conf</h2><div><div class="fold_hider"><div class="close hider_title">点击显示/隐藏内容</div></div><div class="fold">
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> /etc/makepkg.conf</span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">########################################################################</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> SOURCE ACQUISITION</span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">########################################################################</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- The download utilities that makepkg should use to acquire sources</span></span><br><span class="line"><span class="meta">#</span><span class="bash">  Format: <span class="string">'protocol::agent'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">DLAGENTS=(<span class="string">'file::/usr/bin/curl -gqC - -o %o %u'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'rsync::/usr/bin/rsync --no-motd -z %u %o'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">          <span class="string">'scp::/usr/bin/scp -C %u %o'</span>)</span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> axel 单线程多链接</span></span><br><span class="line"><span class="meta">#</span><span class="bash">DLAGENTS=(<span class="string">'file::/usr/bin/axel -a -n 16 %u -o %o'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">		<span class="string">'ftp::/usr/bin/axel -a -n 16 %u -o %o'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">		<span class="string">'http::/usr/bin/axel -a -n 16 %u -o %o'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">		<span class="string">'https::/usr/bin/axel -a -n 16 %u -o %o'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">		<span class="string">'rsync::/usr/bin/rsync --no-motd -z %u %o'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">		<span class="string">'scp::/usr/bin/scp -C %u %o'</span>)</span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> aria2c 多线程多链接</span></span><br><span class="line">DLAGENTS=('file::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'</span><br><span class="line">		'ftp::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'</span><br><span class="line">		'http::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'</span><br><span class="line">		'https::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'</span><br><span class="line">		'rsync::/usr/bin/rsync --no-motd -z %u %o'</span><br><span class="line">		'scp::/usr/bin/scp -C %u %o')</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Other common tools:</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> /usr/bin/snarf</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> /usr/bin/lftpget -c</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> /usr/bin/wget</span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash">-- The package required by makepkg to download VCS sources</span></span><br><span class="line"><span class="meta">#</span><span class="bash">  Format: <span class="string">'protocol::package'</span></span></span><br><span class="line">VCSCLIENTS=('bzr::bzr'</span><br><span class="line">            'git::git'</span><br><span class="line">            'hg::mercurial'</span><br><span class="line">            'svn::subversion')</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">########################################################################</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> ARCHITECTURE, COMPILE FLAGS</span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">########################################################################</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line">CARCH="x86_64"</span><br><span class="line">CHOST="x86_64-pc-linux-gnu"</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash">-- Compiler and Linker Flags</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> -march (or -mcpu) builds exclusively <span class="keyword">for</span> an architecture</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> -mtune optimizes <span class="keyword">for</span> an architecture, but builds <span class="keyword">for</span> whole processor family</span></span><br><span class="line">CPPFLAGS="-D_FORTIFY_SOURCE=2"</span><br><span class="line">CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt"</span><br><span class="line">CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt"</span><br><span class="line">LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"</span><br><span class="line"><span class="meta">#</span><span class="bash">-- Make Flags: change this <span class="keyword">for</span> DistCC/SMP systems</span></span><br><span class="line"><span class="meta">#</span><span class="bash">MAKEFLAGS=<span class="string">"-j2"</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- Debugging flags</span></span><br><span class="line">DEBUG_CFLAGS="-g -fvar-tracking-assignments"</span><br><span class="line">DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">########################################################################</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> BUILD ENVIRONMENT</span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">########################################################################</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> Defaults: BUILDENV=(!distcc color !ccache check !sign)</span></span><br><span class="line"><span class="meta">#</span><span class="bash">  A negated environment option will <span class="keyword">do</span> the opposite of the comments below.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- distcc:   Use the Distributed C/C++/ObjC compiler</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- color:    Colorize output messages</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- ccache:   Use ccache to cache compilation</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- check:    Run the check() <span class="keyword">function</span> <span class="keyword">if</span> present <span class="keyword">in</span> the PKGBUILD</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- sign:     Generate PGP signature file</span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line">BUILDENV=(!distcc color !ccache check !sign)</span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- If using DistCC, your MAKEFLAGS will also need modification. In addition,</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- specify a space-delimited list of hosts running <span class="keyword">in</span> the DistCC cluster.</span></span><br><span class="line"><span class="meta">#</span><span class="bash">DISTCC_HOSTS=<span class="string">""</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- Specify a directory <span class="keyword">for</span> package building.</span></span><br><span class="line"><span class="meta">#</span><span class="bash">BUILDDIR=/tmp/makepkg</span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">########################################################################</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> GLOBAL PACKAGE OPTIONS</span></span><br><span class="line"><span class="meta">#</span><span class="bash">   These are default values <span class="keyword">for</span> the options=() settings</span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">########################################################################</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> Default: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug)</span></span><br><span class="line"><span class="meta">#</span><span class="bash">  A negated option will <span class="keyword">do</span> the opposite of the comments below.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- strip:      Strip symbols from binaries/libraries</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- docs:       Save doc directories specified by DOC_DIRS</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- libtool:    Leave libtool (.la) files <span class="keyword">in</span> packages</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- staticlibs: Leave static library (.a) files <span class="keyword">in</span> packages</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- emptydirs:  Leave empty directories <span class="keyword">in</span> packages</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- zipman:     Compress manual (man and info) pages <span class="keyword">in</span> MAN_DIRS with gzip</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- purge:      Remove files specified by PURGE_TARGETS</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- debug:      Add debugging flags as specified <span class="keyword">in</span> DEBUG_* variables</span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line">OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug)</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash">-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512</span></span><br><span class="line">INTEGRITY_CHECK=(md5)</span><br><span class="line"><span class="meta">#</span><span class="bash">-- Options to be used when stripping binaries. See `man strip<span class="string">' for details.</span></span></span><br><span class="line">STRIP_BINARIES="--strip-all"</span><br><span class="line"><span class="meta">#</span><span class="bash">-- Options to be used when stripping shared libraries. See `man strip<span class="string">' for details.</span></span></span><br><span class="line">STRIP_SHARED="--strip-unneeded"</span><br><span class="line"><span class="meta">#</span><span class="bash">-- Options to be used when stripping static libraries. See `man strip<span class="string">' for details.</span></span></span><br><span class="line">STRIP_STATIC="--strip-debug"</span><br><span class="line"><span class="meta">#</span><span class="bash">-- Manual (man and info) directories to compress (<span class="keyword">if</span> zipman is specified)</span></span><br><span class="line">MAN_DIRS=(&#123;usr&#123;,/local&#125;&#123;,/share&#125;,opt/*&#125;/&#123;man,info&#125;)</span><br><span class="line"><span class="meta">#</span><span class="bash">-- Doc directories to remove (<span class="keyword">if</span> !docs is specified)</span></span><br><span class="line">DOC_DIRS=(usr/&#123;,local/&#125;&#123;,share/&#125;&#123;doc,gtk-doc&#125; opt/*/&#123;doc,gtk-doc&#125;)</span><br><span class="line"><span class="meta">#</span><span class="bash">-- Files to be removed from all packages (<span class="keyword">if</span> purge is specified)</span></span><br><span class="line">PURGE_TARGETS=(usr/&#123;,share&#125;/info/dir .packlist *.pod)</span><br><span class="line"><span class="meta">#</span><span class="bash">-- Directory to store <span class="built_in">source</span> code <span class="keyword">in</span> <span class="keyword">for</span> debug packages</span></span><br><span class="line">DBGSRCDIR="/usr/src/debug"</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">########################################################################</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> PACKAGE OUTPUT</span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">########################################################################</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> Default: put built package and cached <span class="built_in">source</span> <span class="keyword">in</span> build directory</span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- Destination: specify a fixed directory <span class="built_in">where</span> all packages will be placed</span></span><br><span class="line"><span class="meta">#</span><span class="bash">PKGDEST=/home/packages</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- Source cache: specify a fixed directory <span class="built_in">where</span> <span class="built_in">source</span> files will be cached</span></span><br><span class="line"><span class="meta">#</span><span class="bash">SRCDEST=/home/sources</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- Source packages: specify a fixed directory <span class="built_in">where</span> all src packages will be placed</span></span><br><span class="line"><span class="meta">#</span><span class="bash">SRCPKGDEST=/home/srcpackages</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- Log files: specify a fixed directory <span class="built_in">where</span> all <span class="built_in">log</span> files will be placed</span></span><br><span class="line"><span class="meta">#</span><span class="bash">LOGDEST=/home/makepkglogs</span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- Packager: name/email of the person or organization building packages</span></span><br><span class="line"><span class="meta">#</span><span class="bash">PACKAGER=<span class="string">"John Doe &lt;john@doe.com&gt;"</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">-- Specify a key to use <span class="keyword">for</span> package signing</span></span><br><span class="line"><span class="meta">#</span><span class="bash">GPGKEY=<span class="string">""</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">########################################################################</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> COMPRESSION DEFAULTS</span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">########################################################################</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line">COMPRESSGZ=(gzip -c -f -n)</span><br><span class="line">COMPRESSBZ2=(bzip2 -c -f)</span><br><span class="line">COMPRESSXZ=(xz -c -z -)</span><br><span class="line">COMPRESSLRZ=(lrzip -q)</span><br><span class="line">COMPRESSLZO=(lzop -q)</span><br><span class="line">COMPRESSZ=(compress -c -f)</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">########################################################################</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> EXTENSION DEFAULTS</span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">########################################################################</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> WARNING: Do NOT modify these variables unless you know what you are</span></span><br><span class="line"><span class="meta">#</span><span class="bash">          doing.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line">PKGEXT='.pkg.tar.xz'</span><br><span class="line">SRCEXT='.src.tar.gz'</span><br></pre></td></tr></table></figure>

</div></div>
<h2 id="附录III：-etc-pacman-d-mirrorlist"><a href="#附录III：-etc-pacman-d-mirrorlist" class="headerlink" title="附录III：/etc/pacman.d/mirrorlist"></a>附录III：/etc/pacman.d/mirrorlist</h2><div><div class="fold_hider"><div class="close hider_title">点击显示/隐藏内容</div></div><div class="fold">
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">#</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment"># Manjaro Linux custom mirrorlist</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment"># Generated on 2018-12-15 07:14</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">#</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment"># Please use 'pacman-mirrors -id' to reset custom mirrorlist</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment"># Please use 'pacman-mirrors -c all' to reset custom mirrorlist</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment"># To remove custom config run  'pacman-mirrors -c all'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment">#</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment"># Country : China</span></span></span><br><span class="line">Server = https://mirrors.tuna.tsinghua.edu.cn/manjaro/stable/$repo/$arch</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment"># Country : China</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">Server = https://mirrors.ustc.edu.cn/manjaro/stable/<span class="variable">$repo</span>/<span class="variable">$arch</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment"># Country : China</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">Server = https://mirrors.sjtug.sjtu.edu.cn/manjaro/stable/<span class="variable">$repo</span>/<span class="variable">$arch</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment"># Country : China</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">Server = https://mirrors.zju.edu.cn/manjaro/stable/<span class="variable">$repo</span>/<span class="variable">$arch</span></span></span><br></pre></td></tr></table></figure>

</div></div>
<h2 id="附录IV：-zshrc"><a href="#附录IV：-zshrc" class="headerlink" title="附录IV：.zshrc"></a>附录IV：.zshrc</h2><div><div class="fold_hider"><div class="close hider_title">点击显示/隐藏内容</div></div><div class="fold">
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> If you come from bash you might have to change your <span class="variable">$PATH</span>.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">export</span> PATH=<span class="variable">$HOME</span>/bin:/usr/<span class="built_in">local</span>/bin:<span class="variable">$PATH</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Path to your oh-my-zsh installation.</span></span><br><span class="line">  export ZSH="/home/elinuxboy/.oh-my-zsh"</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Set name of the theme to load --- <span class="keyword">if</span> <span class="built_in">set</span> to <span class="string">"random"</span>, it will</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> load a random theme each time oh-my-zsh is loaded, <span class="keyword">in</span> <span class="built_in">which</span> <span class="keyword">case</span>,</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> to know <span class="built_in">which</span> specific one was loaded, run: <span class="built_in">echo</span> <span class="variable">$RANDOM_THEME</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes</span></span><br><span class="line">ZSH_THEME="ys"</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Set list of themes to pick from when loading at random</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> Setting this variable when ZSH_THEME=random will cause zsh to load</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> a theme from this variable instead of looking <span class="keyword">in</span> ~/.oh-my-zsh/themes/</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> If <span class="built_in">set</span> to an empty array, this variable will have no effect.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> ZSH_THEME_RANDOM_CANDIDATES=( <span class="string">"robbyrussell"</span> <span class="string">"agnoster"</span> )</span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Uncomment the following line to use <span class="keyword">case</span>-sensitive completion.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> CASE_SENSITIVE=<span class="string">"true"</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Uncomment the following line to use hyphen-insensitive completion.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> Case-sensitive completion must be off. _ and - will be interchangeable.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> HYPHEN_INSENSITIVE=<span class="string">"true"</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Uncomment the following line to <span class="built_in">disable</span> bi-weekly auto-update checks.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> DISABLE_AUTO_UPDATE=<span class="string">"true"</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Uncomment the following line to change how often to auto-update (<span class="keyword">in</span> days).</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">export</span> UPDATE_ZSH_DAYS=13</span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Uncomment the following line to <span class="built_in">disable</span> colors <span class="keyword">in</span> ls.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> DISABLE_LS_COLORS=<span class="string">"true"</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Uncomment the following line to <span class="built_in">disable</span> auto-setting terminal title.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> DISABLE_AUTO_TITLE=<span class="string">"true"</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Uncomment the following line to <span class="built_in">enable</span> <span class="built_in">command</span> auto-correction.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> ENABLE_CORRECTION=<span class="string">"true"</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Uncomment the following line to display red dots whilst waiting <span class="keyword">for</span> completion.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> COMPLETION_WAITING_DOTS=<span class="string">"true"</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Uncomment the following line <span class="keyword">if</span> you want to <span class="built_in">disable</span> marking untracked files</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> under VCS as dirty. This makes repository status check <span class="keyword">for</span> large repositories</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> much, much faster.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> DISABLE_UNTRACKED_FILES_DIRTY=<span class="string">"true"</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Uncomment the following line <span class="keyword">if</span> you want to change the <span class="built_in">command</span> execution time</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> stamp shown <span class="keyword">in</span> the <span class="built_in">history</span> <span class="built_in">command</span> output.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> You can <span class="built_in">set</span> one of the optional three formats:</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="string">"mm/dd/yyyy"</span>|<span class="string">"dd.mm.yyyy"</span>|<span class="string">"yyyy-mm-dd"</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> or <span class="built_in">set</span> a custom format using the strftime <span class="keyword">function</span> format specifications,</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> see <span class="string">'man strftime'</span> <span class="keyword">for</span> details.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> HIST_STAMPS=<span class="string">"mm/dd/yyyy"</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> 历史命令日期显示格式</span></span><br><span class="line">HIST_STAMPS="yyyy-mm-dd"</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Would you like to use another custom folder than <span class="variable">$ZSH</span>/custom?</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> ZSH_CUSTOM=/path/to/new-custom-folder</span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Which plugins would you like to load?</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> Standard plugins can be found <span class="keyword">in</span> ~/.oh-my-zsh/plugins/*</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> Example format: plugins=(rails git textmate ruby lighthouse)</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> Add wisely, as too many plugins slow down shell startup.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> z命令快速跳转目录     x命令解压一切文件         命令行可以直接google  </span></span><br><span class="line">plugins=(</span><br><span class="line">  git z zsh-autosuggestions extract web-search zsh-syntax-highlighting </span><br><span class="line">)</span><br><span class="line"> </span><br><span class="line">source $ZSH/oh-my-zsh.sh</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> User configuration</span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">export</span> MANPATH=<span class="string">"/usr/local/man:<span class="variable">$MANPATH</span>"</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> You may need to manually <span class="built_in">set</span> your language environment</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">export</span> LANG=en_US.UTF-8</span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Preferred editor <span class="keyword">for</span> <span class="built_in">local</span> and remote sessions</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="keyword">if</span> [[ -n <span class="variable">$SSH_CONNECTION</span> ]]; <span class="keyword">then</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">   <span class="built_in">export</span> EDITOR=<span class="string">'vim'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="keyword">else</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">   <span class="built_in">export</span> EDITOR=<span class="string">'mvim'</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="keyword">fi</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Compilation flags</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">export</span> ARCHFLAGS=<span class="string">"-arch x86_64"</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> ssh</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">export</span> SSH_KEY_PATH=<span class="string">"~/.ssh/rsa_id"</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> Set personal aliases, overriding those provided by oh-my-zsh libs,</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> plugins, and themes. Aliases can be placed here, though oh-my-zsh</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> users are encouraged to define aliases within the ZSH_CUSTOM folder.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> For a full list of active aliases, run `<span class="built_in">alias</span>`.</span></span><br><span class="line"><span class="meta">#</span><span class="bash"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> Example aliases</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">alias</span> zshconfig=<span class="string">"mate ~/.zshrc"</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">alias</span> ohmyzsh=<span class="string">"mate ~/.oh-my-zsh"</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> autojump自动跳转插件</span></span><br><span class="line">. /usr/share/autojump/autojump.zsh</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash">自动补全插件</span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="built_in">source</span> ~/.oh-my-zsh/plugins/incr/incr-0.2.zsh</span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> 自动更新的时间间隔，单位是天，这里设置 30 天更新一次</span></span><br><span class="line">export UPDATE_ZSH_DAYS=1</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> zsh-syntax-highlighting语法高亮插件</span></span><br><span class="line">source $&#123;ZSH&#125;/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> 设置 gcc/g++ 别名</span></span><br><span class="line">alias gcc='gcc -fdiagnostics-color=auto'</span><br><span class="line">alias g++='g++ -fdiagnostics-color=auto'</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> 设置 git 命令自动补全 ，如：git co+敲两次tab键</span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="keyword">if</span> [ -f ~/.git-completion.bash ]; <span class="keyword">then</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash">    . ~/.git-completion.bash</span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="keyword">fi</span></span></span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> 加载vgz驱动和utf8支持</span></span><br><span class="line">alias zhcon='zhcon --utf8'</span><br><span class="line"> </span><br><span class="line">alias cat='bat'</span><br><span class="line"> </span><br><span class="line"><span class="meta">#</span><span class="bash"> 设置环境变量LFS</span></span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="built_in">export</span> LFS=/mnt/lfs</span></span><br></pre></td></tr></table></figure>

</div></div>
      
    </div>

    
      

  <div class="popular-posts-header">相关文章</div>
  <ul class="popular-posts">
  
    <li class="popular-posts-item">
      
      
      <div class="popular-posts-title"><a href="/Linux/Linux-mint-xfce-19-踩坑记录.html" rel="bookmark">Linux-mint-xfce-19-踩坑记录</a></div>
      
    </li>
  
  </ul>


    

    
    
    

    

    
      
    
    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div>文章不错哟，快快打赏吧！</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechatpay.jpg" alt="elinuxoby 微信支付">
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/alipay.jpg" alt="elinuxoby 支付宝">
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    
      <div>
        



  



<ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者： </strong>elinuxoby</li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    
    <a href="https://elinuxboy.github.io/Linux/manjaro-xfce-18-踩坑记录.html" title="manjaro-xfce-18-踩坑记录">https://elinuxboy.github.io/Linux/manjaro-xfce-18-踩坑记录.html</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="noopener" target="_blank"><i class="fa fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！</li>
</ul>

      </div>
    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Linux/" rel="tag"><i class="fa fa-tag"></i> Linux</a>
          
            <a href="/tags/xfce/" rel="tag"><i class="fa fa-tag"></i> xfce</a>
          
            <a href="/tags/踩坑记录/" rel="tag"><i class="fa fa-tag"></i> 踩坑记录</a>
          
            <a href="/tags/manjaro/" rel="tag"><i class="fa fa-tag"></i> manjaro</a>
          
        </div>
      

      
      
        <div class="post-widgets">
        

        

        
          
          <div class="social_share">
            
            
               <div id="needsharebutton-postbottom">
                 <span class="btn">
                    <i class="fa fa-share-alt" aria-hidden="true"></i>
                 </span>
               </div>
            
          </div>
        
        </div>
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/Linux/Linux-mint-xfce-19-踩坑记录.html" rel="next" title="Linux-mint-xfce-19-踩坑记录">
                <i class="fa fa-chevron-left"></i> Linux-mint-xfce-19-踩坑记录
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/Hexo/基于Hexo框架Next主题的个人博客（文章内音乐播放和视频播放）.html" rel="prev" title="基于Hexo框架Next主题的个人博客（文章内音乐播放和视频播放）">
                基于Hexo框架Next主题的个人博客（文章内音乐播放和视频播放） <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>


  </div>


          </div>
          

  
    <div class="comments" id="comments">
      <div id="lv-container" data-id="city" data-uid="MTAyMC80MTkzMC8xODQ3Ng=="></div>
    </div>

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
      <div id="sidebar-dimmer"></div>
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/images/head.jpg" alt="elinuxoby">
            
              <p class="site-author-name" itemprop="name">elinuxoby</p>
              <p class="site-description motion-element" itemprop="description">elinuxboy 的个人博客</p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">7</span>
                    <span class="site-state-item-name">日志</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  <a href="/categories/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">7</span>
                    <span class="site-state-item-name">分类</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  <a href="/tags/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">17</span>
                    <span class="site-state-item-name">标签</span>
                  </a>
                </div>
              
            </nav>
          

          

          
            <div class="links-of-author motion-element">
              
                <span class="links-of-author-item">
                  
                  
                  
                    
                  
                  <a href="https://github.com/elinuxboy" title="GitHub &rarr; https://github.com/elinuxboy" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i></a>
                </span>
              
                <span class="links-of-author-item">
                  
                  
                  
                    
                  
                  <a href="mailto:elinuxboy001@gmail.com" title="E-Mail &rarr; mailto:elinuxboy001@gmail.com" rel="noopener" target="_blank"><i class="fa fa-fw fa-envelope"></i></a>
                </span>
              
                <span class="links-of-author-item">
                  
                  
                  
                    
                  
                  <a href="https://weibo.com/p/1005056887217453" title="Weibo &rarr; https://weibo.com/p/1005056887217453" rel="noopener" target="_blank"><i class="fa fa-fw fa-weibo"></i></a>
                </span>
              
            </div>
          

          
             <div class="cc-license motion-element" itemprop="license">
              
                
              
              
              
              <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="cc-opacity" rel="noopener" target="_blank"><img src="/images/cc-by-nc-sa.svg" alt="Creative Commons"></a>
             </div>
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-inline">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-link"></i>
                友情链接
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.cnblogs.com/elinuxboy" title="https://www.cnblogs.com/elinuxboy" rel="noopener" target="_blank">博客园</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://gitee.com/elinuxboy" title="https://gitee.com/elinuxboy" rel="noopener" target="_blank">Gitee</a>
                  </li>
                
              </ul>
            </div>
          

          
            
          
          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#简介"><span class="nav-number">1.</span> <span class="nav-text">简介</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#Manjaro-Linux"><span class="nav-number">1.1.</span> <span class="nav-text">Manjaro Linux</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#开发桌面环境"><span class="nav-number">1.2.</span> <span class="nav-text">开发桌面环境</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#自动打开-NumLock"><span class="nav-number">2.</span> <span class="nav-text">自动打开 NumLock</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#系统快照"><span class="nav-number">3.</span> <span class="nav-text">系统快照</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#安装timeshift"><span class="nav-number">3.1.</span> <span class="nav-text">安装timeshift</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#使用timeshift创建系统快照"><span class="nav-number">3.2.</span> <span class="nav-text">使用timeshift创建系统快照</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#国内源设置"><span class="nav-number">4.</span> <span class="nav-text">国内源设置</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#manjaro官方软件仓库"><span class="nav-number">4.1.</span> <span class="nav-text">manjaro官方软件仓库</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#自动寻找最快的源"><span class="nav-number">4.1.1.</span> <span class="nav-text">自动寻找最快的源</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#选择源"><span class="nav-number">4.1.2.</span> <span class="nav-text">选择源</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#更新源"><span class="nav-number">4.1.3.</span> <span class="nav-text">更新源</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#非官方仓库（Arch-Linux-中文社区仓库）"><span class="nav-number">4.2.</span> <span class="nav-text">非官方仓库（Arch Linux 中文社区仓库）</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#手动添加archlinuxcn清华源"><span class="nav-number">4.2.1.</span> <span class="nav-text">手动添加archlinuxcn清华源</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#更新源-1"><span class="nav-number">4.2.2.</span> <span class="nav-text">更新源</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#安装archlinuxcn-keyring包导入GPG-key："><span class="nav-number">4.2.3.</span> <span class="nav-text">安装archlinuxcn-keyring包导入GPG key：</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#再次更新源"><span class="nav-number">4.2.4.</span> <span class="nav-text">再次更新源</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#安装yaourt以及pacaur"><span class="nav-number">5.</span> <span class="nav-text">安装yaourt以及pacaur</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#软件安装时下载加速"><span class="nav-number">6.</span> <span class="nav-text">软件安装时下载加速</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#使用aria2c多线程多链接加速"><span class="nav-number">6.1.</span> <span class="nav-text">使用aria2c多线程多链接加速</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#安装aria2c"><span class="nav-number">6.1.1.</span> <span class="nav-text">安装aria2c</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#配置pacman多线程多链接加速"><span class="nav-number">6.1.2.</span> <span class="nav-text">配置pacman多线程多链接加速</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#配置yaourt多线程多链接加速"><span class="nav-number">6.1.3.</span> <span class="nav-text">配置yaourt多线程多链接加速</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#使用Axel单线程多链接加速"><span class="nav-number">6.2.</span> <span class="nav-text">使用Axel单线程多链接加速</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#安装axel"><span class="nav-number">6.2.1.</span> <span class="nav-text">安装axel</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#配置pacman单线程多链接加速"><span class="nav-number">6.2.2.</span> <span class="nav-text">配置pacman单线程多链接加速</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#配置yaourt单线程多链接加速"><span class="nav-number">6.2.3.</span> <span class="nav-text">配置yaourt单线程多链接加速</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#然后更新数据源"><span class="nav-number">6.2.4.</span> <span class="nav-text">然后更新数据源</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#安装被锁定的问题"><span class="nav-number">7.</span> <span class="nav-text">安装被锁定的问题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#升级系统"><span class="nav-number">8.</span> <span class="nav-text">升级系统</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#常见的软件安装"><span class="nav-number">9.</span> <span class="nav-text">常见的软件安装</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#pacman-基本用法"><span class="nav-number">9.1.</span> <span class="nav-text">pacman 基本用法</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#安装软件"><span class="nav-number">9.1.1.</span> <span class="nav-text">安装软件</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#删除软件"><span class="nav-number">9.1.2.</span> <span class="nav-text">删除软件</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#清空缓存"><span class="nav-number">9.1.3.</span> <span class="nav-text">清空缓存</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#查询"><span class="nav-number">9.1.4.</span> <span class="nav-text">查询</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#同步文件数据库"><span class="nav-number">9.1.5.</span> <span class="nav-text">同步文件数据库</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#升级系统-1"><span class="nav-number">9.1.6.</span> <span class="nav-text">升级系统</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装中文输入法"><span class="nav-number">9.2.</span> <span class="nav-text">安装中文输入法</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装字体"><span class="nav-number">9.3.</span> <span class="nav-text">安装字体</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装vim"><span class="nav-number">9.4.</span> <span class="nav-text">安装vim</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#超强vim配置"><span class="nav-number">9.4.1.</span> <span class="nav-text">超强vim配置</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装markdown编辑器"><span class="nav-number">9.5.</span> <span class="nav-text">安装markdown编辑器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装git"><span class="nav-number">9.6.</span> <span class="nav-text">安装git</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装smartGit"><span class="nav-number">9.7.</span> <span class="nav-text">安装smartGit</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装图形化的解压软件"><span class="nav-number">9.8.</span> <span class="nav-text">安装图形化的解压软件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装bat替代cat"><span class="nav-number">9.9.</span> <span class="nav-text">安装bat替代cat</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装护眼软件红移redshift"><span class="nav-number">9.10.</span> <span class="nav-text">安装护眼软件红移redshift</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装gnome磁盘管理"><span class="nav-number">9.11.</span> <span class="nav-text">安装gnome磁盘管理</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装截图软件（可编辑）"><span class="nav-number">9.12.</span> <span class="nav-text">安装截图软件（可编辑）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装google浏览器"><span class="nav-number">9.13.</span> <span class="nav-text">安装google浏览器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装uGet"><span class="nav-number">9.14.</span> <span class="nav-text">安装uGet</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装网易云音乐"><span class="nav-number">9.15.</span> <span class="nav-text">安装网易云音乐</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装osdlyrics（本地音乐播放器显示歌词需要）"><span class="nav-number">9.16.</span> <span class="nav-text">安装osdlyrics（本地音乐播放器显示歌词需要）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装WPS-office"><span class="nav-number">9.17.</span> <span class="nav-text">安装WPS-office</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装有道词典"><span class="nav-number">9.18.</span> <span class="nav-text">安装有道词典</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装ClamAV"><span class="nav-number">9.19.</span> <span class="nav-text">安装ClamAV</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装sublime-text-3"><span class="nav-number">9.20.</span> <span class="nav-text">安装sublime-text-3</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装虚拟机"><span class="nav-number">9.21.</span> <span class="nav-text">安装虚拟机</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装QQ"><span class="nav-number">9.22.</span> <span class="nav-text">安装QQ</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装Tim"><span class="nav-number">9.23.</span> <span class="nav-text">安装Tim</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装微信"><span class="nav-number">9.24.</span> <span class="nav-text">安装微信</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#命令直接安装"><span class="nav-number">9.24.1.</span> <span class="nav-text">命令直接安装</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#源码编译安装"><span class="nav-number">9.24.2.</span> <span class="nav-text">源码编译安装</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#使用发布版"><span class="nav-number">9.24.3.</span> <span class="nav-text">使用发布版</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装oh-my-zsh"><span class="nav-number">9.25.</span> <span class="nav-text">安装oh my zsh</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#查看系统是否安装了zsh"><span class="nav-number">9.25.1.</span> <span class="nav-text">查看系统是否安装了zsh</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#查看系统当前使用的shell"><span class="nav-number">9.25.2.</span> <span class="nav-text">查看系统当前使用的shell</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#切换shell为zsh"><span class="nav-number">9.25.3.</span> <span class="nav-text">切换shell为zsh</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#下载安装-oh-my-zsh"><span class="nav-number">9.25.4.</span> <span class="nav-text">下载安装 oh my zsh</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#配置oh-my-zsh"><span class="nav-number">9.25.5.</span> <span class="nav-text">配置oh my zsh</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#XFCE图标主题美化"><span class="nav-number">10.</span> <span class="nav-text">XFCE图标主题美化</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#安装图标"><span class="nav-number">10.1.</span> <span class="nav-text">安装图标</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装主题"><span class="nav-number">10.2.</span> <span class="nav-text">安装主题</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#设置"><span class="nav-number">10.3.</span> <span class="nav-text">设置</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#优化系统启动速度"><span class="nav-number">11.</span> <span class="nav-text">优化系统启动速度</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#将npm的注册表源设置为国内的镜像"><span class="nav-number">12.</span> <span class="nav-text">将npm的注册表源设置为国内的镜像</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#问题与解决"><span class="nav-number">13.</span> <span class="nav-text">问题与解决</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#安装中遇到的问题"><span class="nav-number">13.1.</span> <span class="nav-text">安装中遇到的问题</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#警告：xxx本地比xxx的版本更新"><span class="nav-number">13.2.</span> <span class="nav-text">警告：xxx本地比xxx的版本更新</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#解决办法"><span class="nav-number">13.2.1.</span> <span class="nav-text">解决办法</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#aria2c下载xxx-db-sig出现错误"><span class="nav-number">13.3.</span> <span class="nav-text">aria2c下载xxx.db.sig出现错误</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#解决办法-1"><span class="nav-number">13.3.1.</span> <span class="nav-text">解决办法</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#错误：无法注册-‘archlinuxcn’-数据库-数据库已登记"><span class="nav-number">13.4.</span> <span class="nav-text">错误：无法注册 ‘archlinuxcn’ 数据库 (数据库已登记)</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#附录I：-etc-pacman-conf"><span class="nav-number">14.</span> <span class="nav-text">附录I：/etc/pacman.conf</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#附录II：-etc-makepkg-conf"><span class="nav-number">15.</span> <span class="nav-text">附录II：/etc/makepkg.conf</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#附录III：-etc-pacman-d-mirrorlist"><span class="nav-number">16.</span> <span class="nav-text">附录III：/etc/pacman.d/mirrorlist</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#附录IV：-zshrc"><span class="nav-number">17.</span> <span class="nav-text">附录IV：.zshrc</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2018 – <span itemprop="copyrightYear">2019</span>
  <span class="with-love" id="animate">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">elinuxboy 版权所有</span>

  
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    
      <span class="post-meta-item-text">站点总字数：</span>
    
    <span title="站点总字数">65k</span>
  

  
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    
      <span class="post-meta-item-text">站点阅读时长 &asymp;</span>
    
    <span title="站点阅读时长">59 分钟</span>
  
</div>


  <div class="powered-by">由 <a href="https://hexo.io" class="theme-link" rel="noopener" target="_blank">Hexo</a> 强力驱动 v3.8.0</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 – <a href="https://theme-next.org" class="theme-link" rel="noopener" target="_blank">NexT.Mist</a> v6.6.0</div>





<span class="post-meta-divider"> | </span>

<span><i class="fa fa-plug"></i></span>
<span id="showDays"></span>
<script>
  var seconds = 1000;
  var minutes = seconds * 60;
  var hours = minutes * 60;
  var days = hours * 24;
  var years = days * 365;
  var birthDay = Date.UTC(2018,12,31,23,59,59); // 这里设置建站时间
  setInterval(function() {
    var today = new Date();
    var todayYear = today.getFullYear();
    var todayMonth = today.getMonth()+1;
    var todayDate = today.getDate();
    var todayHour = today.getHours();
    var todayMinute = today.getMinutes();
    var todaySecond = today.getSeconds();
    var now = Date.UTC(todayYear,todayMonth,todayDate,todayHour,todayMinute,todaySecond);
    var diff = now - birthDay;
    var diffYears = Math.floor(diff/years);
    var diffDays = Math.floor((diff/days)-diffYears*365);
    var diffHours = Math.floor((diff-(diffYears*365+diffDays)*days)/hours);
    var diffMinutes = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours)/minutes);
    var diffSeconds = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours-diffMinutes*minutes)/seconds);
      document.getElementById('showDays').innerHTML="本站已运行 "+diffYears+" 年 "+diffDays+" 天 "+diffHours+" 小时 "+diffMinutes+" 分钟 "+diffSeconds+" 秒";
  }, 1000);
</script>
        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv" title="总访客量">
      <i class="fa fa-user"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
    </span>
  

  
    <span class="site-pv" title="总访问量">
      <i class="fa fa-eye"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
    </span>
  
</div>









        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
          <span id="scrollpercent"><span>0</span>%</span>
        
      </div>
    

    

    

    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>












  















  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.6.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.6.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.6.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.6.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.6.0"></script>



  



  
    <script type="text/javascript">
      window.livereOptions = {
        refer: 'Linux/manjaro-xfce-18-踩坑记录.html'
      };
      (function(d, s) {
        var j, e = d.getElementsByTagName(s)[0];
        if (typeof LivereTower === 'function') { return; }
        j = d.createElement(s);
        j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
        j.async = true;
        e.parentNode.insertBefore(j, e);
      })(document, 'script');
    </script>
  










  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  

  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>


  

  

  
  
  
  <script src="/lib/needsharebutton/needsharebutton.js"></script>

  <script>
    
      pbOptions = {};
      
          pbOptions.iconStyle = "box";
      
          pbOptions.boxForm = "horizontal";
      
          pbOptions.position = "bottomCenter";
      
          pbOptions.networks = "Weibo,Wechat,Douban,QQZone,Twitter,Facebook";
      
      new needShareButton('#needsharebutton-postbottom', pbOptions);
    
    
  </script>

  

  
  
  
  <script src="/lib/pangu/dist/pangu.min.js?v=3.3"></script>
  <script type="text/javascript">pangu.spacingPage();</script>


  

  

  

  
  <style>
    .copy-btn {
      display: inline-block;
      padding: 6px 12px;
      font-size: 13px;
      font-weight: 700;
      line-height: 20px;
      color: #333;
      white-space: nowrap;
      vertical-align: middle;
      cursor: pointer;
      background-color: #eee;
      background-image: linear-gradient(#fcfcfc, #eee);
      border: 1px solid #d5d5d5;
      border-radius: 3px;
      user-select: none;
      outline: 0;
    }

    .highlight-wrap .copy-btn {
      transition: opacity .3s ease-in-out;
      opacity: 0;
      padding: 2px 6px;
      position: absolute;
      right: 4px;
      top: 8px;
    }

    .highlight-wrap:hover .copy-btn,
    .highlight-wrap .copy-btn:focus {
      opacity: 1
    }

    .highlight-wrap {
      position: relative;
    }
  </style>
  <script>
    $('.highlight').each(function (i, e) {
      var $wrap = $('<div>').addClass('highlight-wrap')
      $(e).after($wrap)
      $wrap.append($('<button>').addClass('copy-btn').append('复制').on('click', function (e) {
        var code = $(this).parent().find('.code').find('.line').map(function (i, e) {
          return $(e).text()
        }).toArray().join('\n')
        var ta = document.createElement('textarea')
        document.body.appendChild(ta)
        ta.style.position = 'absolute'
        ta.style.top = '0px'
        ta.style.left = '0px'
        ta.value = code
        ta.select()
        ta.focus()
        var result = document.execCommand('copy')
        document.body.removeChild(ta)
        
          if(result)$(this).text('复制成功')
          else $(this).text('复制失败')
        
        $(this).blur()
      })).on('mouseleave', function (e) {
        var $b = $(this).find('.copy-btn')
        setTimeout(function () {
          $b.text('复制')
        }, 300)
      }).append(e)
    })
  </script>


  


  <!-- 点击出现桃心效果 -->
  <script type="text/javascript" src="/js/src/clickedLove.js"></script>

  <!-- Aplayer -->
  <link rel="stylesheet" href="/aplayer/APlayer.min.css">
  <div id="aplayer"></div>
  <script type="text/javascript" src="/aplayer/APlayer.min.js"></script>
  <script type="text/javascript" src="/aplayer/music.js"></script>

</body>
</html>
